-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
46 lines (42 loc) · 1.05 KB
/
docker-compose.dev.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
version: '3.8'
services:
app:
build:
context: .
dockerfile: ./docker/Dockerfile.dev
volumes:
- .:/app #코드 변경 시 컨테이너 내에서 즉시 반영
- /app/node_modules
env_file:
- ./.env
ports:
- '${APP_PORT}:3000'
depends_on:
- db_dev
networks:
- bookpecker-network
db_dev:
image: postgres:15.7
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PORT: ${POSTGRES_PORT}
TZ: 'Asia/Seoul' # 시간대를 한국 표준시로 설정
ports:
- '${POSTGRES_PORT}:5432'
volumes:
- postgres-data-dev:/var/lib/postgresql/data
- ./docker/db-init.sh:/docker-entrypoint-initdb.d/db-init.sh
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 30s
timeout: 10s
retries: 5
networks:
- bookpecker-network
volumes:
postgres-data-dev:
networks:
bookpecker-network: