Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (103 loc) · 2.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
109 lines (103 loc) · 2.22 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
services:
mysql:
image: mysql:8.0
container_name: ${MYSQL_HOST}
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
retries: 40
start_period: 1s
timeout: 10s
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
TZ: Asia/Seoul
LANG: C.UTF-8
command: --skip-character-set-client-handshake
volumes:
- ./initdb:/docker-entrypoint-initdb.d
- mysql-data:/var/lib/mysql
expose:
- "3306"
networks:
- king
redis:
image: redis:alpine
container_name: redis
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
retries: 5
start_period: 1s
timeout: 10s
restart: always
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
volumes:
- redis-data:/data
expose:
- "6379"
networks:
- king
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.1
container_name: elastic
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 5s
retries: 60
start_period: 5s
timeout: 10s
restart: always
environment:
discovery.type: single-node
xpack.security.enabled: false
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD}
volumes:
- elastic-data:/usr/share/elasticsearch/data
expose:
- "9200"
networks:
- king
springboot:
image: puranium235/king-backend:latest
container_name: springboot
restart: always
env_file:
- .env
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
elastic:
condition: service_healthy
expose:
- "8080"
networks:
- king
nginx:
image: nginx:1.27.3-alpine
container_name: nginx
restart: always
env_file:
- .env
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./king/dist:/usr/share/nginx/html
- /etc/letsencrypt:/etc/letsencrypt
depends_on:
- springboot
networks:
- king
volumes:
mysql-data:
external: true
redis-data:
elastic-data:
networks:
king:
external: true