generated from rolling-scopes-school/nodejs-course-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
60 lines (56 loc) · 1.03 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
services:
server:
build:
context: .
develop:
watch:
- action: rebuild
path: ./src
- action: rebuild
path: package.json
env_file:
- .env
environment:
NODE_ENV: production
ports:
- ${APP_PORT}:${APP_PORT}
restart: on-failure
depends_on:
db:
condition: service_healthy
volumes:
- logs:/usr/src/app/logs
networks:
- custom-network
db:
image: postgres
restart: always
user: postgres
env_file:
- .env
expose:
- ${POSTGRES_PORT}
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
command:
- "-c"
- "logging_collector=on"
- "-c"
- "log_directory=logs"
- "-c"
- "log_statement=all"
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- db-data:/var/lib/postgresql/data
networks:
- custom-network
volumes:
db-data:
logs:
networks:
custom-network:
driver: bridge