-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (41 loc) · 1.02 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
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile-Frontend
image: ${FRONTEND_IMAGE}
ports:
- "${FRONTEND_PORT:-3000}:80"
environment:
- VITE_API_URL=http://backend:{BACKEND_PORT:-5000}
- NODE_ENV=production
restart: always
networks:
- app-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile-Backend
image: ${BACKEND_IMAGE}
ports:
- "${BACKEND_PORT:-5000}:5000"
environment:
- NODE_ENV=production
- PORT=${BACKEND_PORT:-5000}
- POSTGRES_CONNECTION_STRING=${POSTGRES_CONNECTION_STRING:?Lacking Postgres connection string}
restart: always
networks:
- app-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${BACKEND_PORT:-5000}"]
interval: 30s
timeout: 10s
retries: 5
networks:
app-network:
driver: bridge