forked from yangzongzhuan/RuoYi-fast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (82 loc) · 2.33 KB
/
docker-compose.yml
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
version: '2'
services:
app-mysql:
image: mysql:8.0.29
container_name: app-mysql
hostname: app-mysql
environment:
MYSQL_ROOT_PASSWORD: 8ZYyfjjJZdDrnwFq
# 不在此处建库,使用 bin/db_init.sh|ps1 建库
# MYSQL_DATABASE: app_db
# MYSQL_USER: app_admin
# MYSQL_PASSWORD: YrP9BfHvDvZTQiux
command: [ "--default-authentication-plugin=mysql_native_password", "--character-set-server=utf8mb4" ]
volumes:
- ./volumes/mysql/conf/docker.cnf:/etc/mysql/conf.d/docker.cnf
- ./volumes/mysql/data:/var/lib/mysql
ports:
- 127.0.0.1:3306:3306
networks:
app-net:
ipv4_address: 172.168.100.2
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 5s
retries: 10
# 忽略 docker 运行时的安全认证
security_opt:
- seccomp:unconfined
restart: on-failure
app-redis:
image: redis:6.2.6
container_name: app-redis
hostname: app-redis
ports:
- 127.0.0.1:6379:6379
volumes:
- ./volumes/redis/conf/redis.conf:/etc/redis/redis.conf
- ./volumes/redis/data:/data
command: [ 'redis-server', '/etc/redis/redis.conf' ]
networks:
app-net:
ipv4_address: 172.168.100.3
restart: on-failure
# app-demo:
# build:
# context: .
# dockerfile: ./Dockerfile
# args:
# APP_DIR: app
# APP_JAR: app.jar
# container_name: app-app
# hostname: centos
# environment:
# - TZ=Asia/Shanghai
# - LANG=zh_CN.UTF-8
# - LANGUAGE=zh_CN.UTF-8
# - LC_ALL=zh_CN.UTF-8
# # 配置文件中密码的解压密码
# - JASYPT_ENCRYPTOR_PASSWORD=${JASYPT_PWD}
# # jar 包的解密密码,maven 编译时的密码保持一致,请勿泄露给渗透测试人员或随意变更,否则无法解密
# - CONFUSE_PWD=${CONFUSE_PWD}
# - CONFUSE_PATH=/var/lib/apt/lists/.lock
# volumes:
# - ./logs:/var/cache/app/logs
# # 接入 app-nginx 访问,不暴露端口
# # ports:
# # - 127.0.0.1:8253:8080
# networks:
# app-net:
# ipv4_address: 172.168.100.253
# depends_on:
# - app-mysql
# - app-redis
# restart: on-failure
networks:
app-net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.168.100.0/24
gateway: 172.168.100.1