forked from need4deed-org/fe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (77 loc) · 1.68 KB
/
docker-compose.yml
File metadata and controls
78 lines (77 loc) · 1.68 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
services:
be:
container_name: be
depends_on:
bootstrap:
condition: service_completed_successfully
build:
context: ../be
args:
NODE_ENV: development
JWT_SECRET: ${JWT_SECRET:-"dasdasfghghfjghjhgkl"}
env_file:
- .env
environment:
- NODE_ENV=development
- JWT_SECRET=dasdasfghghfjghjhgkl
- CORS_ORIGINS=http://localhost:3000
- PORT=8000
- DB_HOST=db
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_NAME=postgres
- DB_SCHEMA=public
ports:
- 8000:8000
bootstrap:
container_name: data-bootstrap
depends_on:
db:
condition: service_healthy
build:
context: ../be/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:
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
fe:
build:
context: .
dockerfile: Dockerfile
args:
NODE_ENV: ${NODE_ENV:-development}
API_URL: "http://be:8000"
container_name: fe
ports:
- "3000:3000"
env_file: .env
environment:
- NODE_ENV=${NODE_ENV:-development}
- API_URL=http://localhost:8000
volumes:
be_database:
driver: local
networks:
n4d-net:
external: true