-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
83 lines (79 loc) · 1.72 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
83 lines (79 loc) · 1.72 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
services:
be:
container_name: be
depends_on:
bootstrap:
condition: service_completed_successfully
build:
context: .
args:
NODE_ENV: ${NODE_ENV}
JWT_SECRET: ${JWT_SECRET:-"some fucking gibberish"}
env_file:
- .env
environment:
- NODE_ENV=${NODE_ENV}
- RUN_MIGRATIONS=${RUN_MIGRATIONS:-true}
- PORT=8000
- NOTIFY_EMAIL_DRY_RUN=true
- NOTIFY_SLACK_DRY_RUN=true
- DB_HOST=db
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_NAME=postgres
- DB_SCHEMA=public
ports:
- ${BE_PORT:-5000}:${PORT:-8000}
networks:
- n4d-net
volumes:
- ./:/app
command: ["yarn", "dev"]
bootstrap:
container_name: data-bootstrap
depends_on:
db:
condition: service_healthy
build:
context: .
dockerfile: data-bootstrap/Dockerfile
networks:
- n4d-net
environment:
- NODE_ENV=development
- RUN_MIGRATIONS=true
- DB_HOST=db
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_NAME=postgres
- DB_SCHEMA=public
db:
container_name: db
image: postgres:17.9
ports:
- 5432:5432
environment:
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- be_database:/var/lib/postgresql
networks:
- n4d-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
be_database:
driver: local
networks:
n4d-net:
external: true