-
-
Notifications
You must be signed in to change notification settings - Fork 64
/
docker-compose.yml
53 lines (49 loc) · 1.06 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
version: '3.9'
services:
app_server:
container_name: app_server
image: app_server:2.0.0
build:
context: .
target: production
dockerfile: ./Dockerfile
command: npm run start:prod
env_file: .env
ports:
- '127.0.0.1:3000:3000'
- '127.0.0.1:9229:9229'
networks:
- app-network
volumes:
- .:/usr/src/app:ro
- /usr/src/app/node_modules
restart: unless-stopped
depends_on:
database:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
database:
container_name: app_postgres_dev
image: postgres:16-alpine
env_file: .env
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- app-network
ports:
- '127.0.0.1:5432:5432'
healthcheck:
test: pg_isready -U postgres
interval: 10s
timeout: 5s
retries: 5
networks:
app-network:
driver: bridge
volumes:
postgres-data:
driver: local