-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
64 lines (61 loc) · 1.47 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# https://www.docker.com/blog/how-to-deploy-on-remote-docker-hosts-with-docker-compose/
version: '3.7'
services:
frontend:
build:
context: .
dockerfile: apps/stllctn-frontend/Dockerfile.prod
ports:
- "3500:80"
stdin_open: true
volumes:
- ./:/app
- /app/node_modules
- /app/apps/stllctn-frontend/node_modules
# command: npm run dev:frontend
environment:
NODE_ENV: production
backend:
build:
context: .
dockerfile: apps/stllctn-backend/Dockerfile.prod
environment:
- SQL_HOST=postgres
- SQL_USER=postgres
- SQL_PASSWORD=password
- SQL_DATABASE=postgres
- NODE_ENV=production
- RUST_BACKTRACE=1
ports:
- "5500:5500"
volumes:
- ./:/app
- /app/node_modules
- /app/apps/stllctn-backend/node_modules
- ../stellection-data/stellection-data:/data
depends_on:
- postgres
restart: always
command: [
# this file must be chmod +x on YOUR COMPUTER
"./apps/stllctn-backend/scripts/wait-for-it.sh",
"postgres:5555",
"--",
"npm",
"run",
"entrypoint:backend"
]
postgres:
image: 'postgres:12'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres
ports:
- '5555:5555'
volumes:
- ../stellection-data/postgres-data:/var/lib/postgresql/data
command: -p 5555
volumes:
cache:
driver: local