-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
85 lines (81 loc) · 2.01 KB
/
docker-compose.dev.yml
File metadata and controls
85 lines (81 loc) · 2.01 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
84
85
# Docker 개발 환경 (DB + Redis + API)
# 사용: pnpm docker:dev:up
# DB는 로컬 Docker 컨테이너, API는 DATABASE_URL로 연결
services:
db:
image: postgres:16-alpine
container_name: aido-dev-db
ports:
- "${DB_PORT:-5433}:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: aido
volumes:
- dev_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d aido"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: aido-dev-redis
ports:
- "6379:6379"
volumes:
- dev_redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
migrate:
build:
context: .
dockerfile: apps/api/Dockerfile
target: migrate
container_name: aido-dev-migrate
env_file:
- .env.docker.dev
depends_on:
db:
condition: service_healthy
restart: "no"
logging:
driver: json-file
options:
max-size: "20m"
max-file: "5"
api:
build:
context: .
dockerfile: apps/api/Dockerfile
target: development
container_name: aido-dev-api
ports:
- "8080:8080"
environment:
TZ: Asia/Seoul
env_file:
- .env.docker.dev
volumes:
- ./apps/api/src:/app/apps/api/src
- ./apps/api/prisma:/app/apps/api/prisma
- ./packages/errors/src:/app/packages/errors/src
- ./packages/utils/src:/app/packages/utils/src
- ./packages/validators/src:/app/packages/validators/src
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1"]
interval: 30s
timeout: 10s
start_period: 30s
retries: 3
depends_on:
redis:
condition: service_healthy
migrate:
condition: service_completed_successfully
volumes:
dev_postgres_data:
dev_redis_data: