-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
42 lines (40 loc) · 1 KB
/
docker-compose.yaml
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
services:
backend:
build:
context: ./backend
container_name: backend
ports:
- "3000:3000"
env_file:
- .env
environment:
- PORT=3000
- DB_HOST=host.docker.internal
networks:
- secure-auth-project
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => r.statusCode === 200 ? process.exit(0) : process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
frontend:
build:
context: ./frontend
container_name: frontend
ports:
- "80:80"
environment:
- BACKEND_URL=http://backend:3000
depends_on:
backend:
condition: service_healthy
networks:
- secure-auth-project
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost/health', (r) => r.statusCode === 200 ? process.exit(0) : process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
networks:
secure-auth-project:
driver: bridge