-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
51 lines (46 loc) · 1.12 KB
/
docker-compose.yaml
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
version: '3.8'
services:
mysql:
image: mysql:5.7
container_name: maple-leaf-db
platform: linux/x86_64
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
networks:
- maple-leaf-be-db
volumes:
- ./db/conf.d:/etc/mysql/conf.d
- ./db/data:/var/lib/mysql
restart: always
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u", "root", "-p$MYSQL_ROOT_PASSWORD"]
timeout: 20s
retries: 10
springboot:
build: .
container_name: maple-leaf-server
depends_on:
mysql:
condition: service_healthy
environment:
SSL_PWD: ${SSL_PWD}
REDIS_PORT: ${REDIS_PORT}
REDIS_HOST: ${REDIS_HOST}
JWT_PASSWORD: ${JWT_PASSWORD}
ports:
- "45000:8080"
restart: always
networks:
- maple-leaf-be-db
redis:
image: redis:7.0-alpine
container_name: maple-leaf-redis
networks:
- maple-leaf-be-db
restart: always
networks:
maple-leaf-be-db:
external: true