-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
53 lines (51 loc) · 1.35 KB
/
docker-compose.yaml
File metadata and controls
53 lines (51 loc) · 1.35 KB
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
services:
# NestJS API Backend
consolideth-api:
build:
context: ./api
dockerfile: Dockerfile
container_name: consolideth-api
environment:
- NODE_ENV=production
- APP_PORT=${APP_PORT:-3000}
ports:
- "${APP_PORT:-3000}:${APP_PORT:-3000}"
networks:
- consolideth-network
restart: unless-stopped
healthcheck:
test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://localhost:${APP_PORT:-3000}/api/v1/health || exit 1"]
timeout: 10s
retries: 10
interval: 15s
start_period: 10s
volumes:
- ./api/.env:/usr/src/app/.env:ro
command: ["npm", "run", "start:prod"]
# React Frontend
consolideth-frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- VITE_API_URL=http://localhost:${APP_PORT:-3000}
container_name: consolideth-frontend
ports:
- "${FRONTEND_PORT:-4000}:80"
depends_on:
consolideth-api:
condition: service_healthy
networks:
- consolideth-network
restart: unless-stopped
healthcheck:
test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://localhost:80 || exit 1"]
timeout: 10s
retries: 5
interval: 15s
start_period: 15s
# Networks
networks:
consolideth-network:
name: consolideth-network
driver: bridge