-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
72 lines (68 loc) · 1.46 KB
/
docker-compose.yaml
File metadata and controls
72 lines (68 loc) · 1.46 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
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=5000
- DB_HOST=db
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_NAME=postgres
- DB_SCHEMA=public
ports:
- 5000:5000
volumes:
- ./:/app
command: ["yarn", "dev"]
bootstrap:
container_name: data-bootstrap
depends_on:
db:
condition: service_healthy
build:
context: ./data-bootstrap
environment:
- 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.2
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
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