-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (49 loc) · 1.15 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
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- ./frontend:/app
- node_modules_volume:/app/node_modules
command: sh -c "pnpm run start"
ports:
- "5173:5173"
environment:
- CHOKIDAR_USEPOLLING=true
- NODE_ENV=development
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "1323:1323"
environment:
- PG_HOST=database
- PG_USER=${PG_USER}
- PG_PASSWORD=${PG_PASSWORD}
- PG_DBNAME=${PG_DBNAME}
- PG_PORT=${PG_PORT}
- PG_SSLMODE=${PG_SSLMODE}
depends_on:
database:
condition: service_healthy
database:
image: postgres:16
environment:
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PASSWORD}
POSTGRES_DB: ${PG_DBNAME}
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
- ./init_db:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${PG_DBNAME} -U ${PG_USER}"]
interval: 5s
timeout: 3s
retries: 20
volumes:
db_data:
node_modules_volume: