-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (67 loc) · 1.8 KB
/
docker-compose.yml
File metadata and controls
70 lines (67 loc) · 1.8 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
services:
server:
image: herewe/herewe-server:latest
ports:
- 8080:8080
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/${MYSQL_DATABASE}?serverTimezone=UTC&characterEncoding=UTF-8
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=${MYSQL_ROOT_PASSWORD}
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=com.mysql.cj.jdbc.Driver
- SPRING_PROFILES_ACTIVE=prod,oauth,common
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:file:/config/
volumes:
- ./configs:/config # <== 이 폴더 안에 yml 파일들 넣어두기
depends_on:
- db
- redis
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/api/auth/health-check" ]
interval: 10s
timeout: 3s
retries: 5
start_period: 15s
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
volumes:
- ./mysql_data:/var/lib/mysql
ports:
- 3306:3306
command:
- "mysqld"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
redis:
image: redis
ports:
- 6379:6379
command: >
redis-server
--requirepass ${REDIS_ROOT_PASSWORD}
--appendonly yes
--save 900 1
--save 300 10
--save 60 10000
--replicaof no one
--replica-read-only no
volumes:
- ./redis_data:/data
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "redis-cli -a $REDIS_ROOT_PASSWORD ping" ]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
networks:
default:
driver: bridge