-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (56 loc) · 1.45 KB
/
Copy pathdocker-compose.yml
File metadata and controls
59 lines (56 loc) · 1.45 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
services:
db:
image: mariadb:10.11
container_name: sool-mariadb
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: sool
MYSQL_USER: sool
MYSQL_PASSWORD: soolpass
ports:
- "3307:3306"
volumes:
- sool_mariadb_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$$MYSQL_ROOT_PASSWORD"]
interval: 10s
timeout: 5s
retries: 5
backend:
build: ./backend
container_name: sool-backend
env_file:
- .env
environment:
- DB_HOST=db
- DB_USER=sool
- DB_PASSWORD=soolpass
- DB_NAME=sool
depends_on:
db:
condition: service_healthy
ports:
- "8000:8000"
volumes:
- ./backend:/app # ⭐ 로컬 백엔드 코드 연동 (실시간 반영)
- ./backend/app/static:/app/app/static
# FastAPI 개발용 핫 리로딩 활성화
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
frontend:
build:
context: ./frontend
container_name: sool-frontend
ports:
- "3300:3000"
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8000
- BACKEND_URL=http://backend:8000
- WATCHPACK_POLLING=true # 도커 환경에서 핫 리로딩 신뢰성 향상
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
depends_on:
- backend
volumes:
sool_mariadb_data: