forked from GB-able/WIDYU-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
76 lines (71 loc) · 1.85 KB
/
docker-compose.dev.yml
File metadata and controls
76 lines (71 loc) · 1.85 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
# Development environment override
# 사용법: docker compose -f docker-compose.yml -f docker-compose.dev.yml up
# 개발 환경은 내부 MySQL 컨테이너 사용
services:
# MySQL Database (개발 전용)
mysql:
image: mysql:8.0
container_name: widyu-mysql-dev
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${MYSQL_USERNAME}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
TZ: Asia/Seoul
ports:
- "${HOST_MYSQL_PORT}:3306"
volumes:
- mysql_data:/var/lib/mysql
- ./scripts/mysql/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --default-authentication-plugin=mysql_native_password
networks:
- widyu-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# Spring API (로컬/개발 설정 오버라이드)
widyu-api:
container_name: widyu-api-dev
environment:
SPRING_PROFILES_ACTIVE: dev
JAVA_OPTS: >
-Xms512m
-Xmx1024m
-XX:+UseG1GC
-XX:MaxGCPauseMillis=200
ports:
- "8080:8080"
depends_on:
- mysql
- redis
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Redis (로컬/개발 설정)
redis:
container_name: widyu-redis-dev
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Nginx (로컬/개발 설정)
nginx:
container_name: widyu-nginx-dev
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
mysql_data:
driver: local