-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
64 lines (61 loc) · 1.46 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
52
53
54
55
56
57
58
59
60
61
62
63
64
version: '3.8'
networks:
bridge:
driver: bridge
services:
eairp:
image: eairp
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:80"
- "8088:8088"
environment:
SPRING_DATASOURCE_URL: "${SPRING_DATASOURCE_URL}"
SPRING_DATASOURCE_USERNAME: "${SPRING_DATASOURCE_USERNAME}"
SPRING_DATASOURCE_PASSWORD: "${SPRING_DATASOURCE_PASSWORD}"
SPRING_REDIS_HOST: "${SPRING_REDIS_HOST}"
SPRING_REDIS_PORT: "${SPRING_REDIS_PORT}"
SPRING_REDIS_PASSWORD: "${SPRING_REDIS_PASSWORD}"
API_BASE_URL: "${API_BASE_URL}"
SPRING_PROFILE: "docker"
depends_on:
- mysql
- redis
networks:
- bridge
mysql:
image: mysql:8.0
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_DATABASE: "eairp"
MYSQL_USER: "${MYSQL_USER}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
command:
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_bin"
- "--explicit-defaults-for-timestamp=1"
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
- ./mysql-scripts:/docker-entrypoint-initdb.d
cap_add:
- SYS_NICE
networks:
- bridge
redis:
image: redis:7.0
container_name: redis
command: redis-server --requirepass 123456
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- bridge
volumes:
mysql-data:
redis-data: