提交 | 用户 | 时间
|
a6de49
|
1 |
version: '1.0' |
H |
2 |
services: |
|
3 |
#项目名称,用docker-compose做管理时,每个项目用这里配置的名称进行单独管理 |
|
4 |
## mysql |
|
5 |
mysql-db: |
|
6 |
# 指定容器的名称 |
|
7 |
container_name: mysql |
|
8 |
# 指定镜像和版本 |
|
9 |
image: mysql:8.0 |
|
10 |
ports: |
|
11 |
- "3306:3306" |
|
12 |
restart: always |
|
13 |
environment: |
|
14 |
# 配置root密码 |
|
15 |
MYSQL_ROOT_PASSWORD: 123456 |
|
16 |
volumes: |
|
17 |
# 挂载数据目录 |
|
18 |
- "/sda2/mysql/data:/var/lib/mysql" |
|
19 |
# 挂载配置文件目录 |
|
20 |
- "/sda2/mysql/conf:/etc/mysql/conf.d" |
|
21 |
## redis |
|
22 |
redis: |
|
23 |
image: redis:latest |
|
24 |
container_name: redis |
|
25 |
restart: always |
|
26 |
ports: |
|
27 |
- 6379:6379 |
|
28 |
volumes: |
|
29 |
- ./redis-data:/data:rw |
|
30 |
## nacos |
|
31 |
nacos: |
|
32 |
# 根据需要修改版本 |
|
33 |
image: nacos/nacos-server:2.3.2 |
|
34 |
container_name: nacos-standalone |
|
35 |
restart: always |
|
36 |
environment: |
|
37 |
- PREFER_HOST_MODE=hostname |
|
38 |
- MODE=standalone |
|
39 |
volumes: |
|
40 |
- ./nacos/logs/:/home/nacos/logs |
|
41 |
- ./nacos/data/:/home/nacos/data |
|
42 |
ports: |
|
43 |
- "8848:8848" |
|
44 |
depends_on: |
|
45 |
- mysql |
|
46 |
healthcheck: |
|
47 |
test: ["CMD","curl","-f","http://localhost:8848/nacos"] |
|
48 |
interval: 10s |
|
49 |
timeout: 30s |
|
50 |
retries: 3 |
|
51 |
## xxl-job |
|
52 |
xxl-job: |
|
53 |
# 根据需要修改版本 |
|
54 |
image: xxl-job:latest |
|
55 |
container_name: xxl-job |
|
56 |
restart: always |
|
57 |
volumes: |
4d4165
|
58 |
- /sda2/iailab/iailab-plat/xxl-job/logs/:/data/applogs |
a6de49
|
59 |
ports: |
H |
60 |
- "9090:9090" |
|
61 |
depends_on: |
|
62 |
- mysql |
|
63 |
# gateway: |
|
64 |
# #镜像名,拉取镜像时也是用这个名字作为地址 |
|
65 |
# image: ic-gateway |
|
66 |
# container_name: ic-gateway |
|
67 |
# #打包路径,即docker build的路径 |
|
68 |
# build: ./api/gateway/ |
|
69 |
# restart: always |
|
70 |
# #环境变量 |
|
71 |
# environment: |
|
72 |
# CONFIG_SERVER: 172.19.188.43:8848 #配置中心地址 |
|
73 |
# #挂载目录 |
|
74 |
# volumes: |
|
75 |
# - /etc/localtime:/etc/localtime:ro #时间同步 |
|
76 |
# - ./api/gateway-lib:/home/beex-gateway/lib |
|
77 |
# - ./api/gateway/:/home/beex-gateway |
|
78 |
# - ./logs:/logs |
|
79 |
# #开放端口 |
|
80 |
# ports: |
|
81 |
# - "9990:9000" |
|
82 |
# - "9777:8777" |
|
83 |
# networks: |
|
84 |
# - 246-multi-tenant |
|
85 |
# depends_on: |
|
86 |
# nacos: |
|
87 |
# condition: service_healthy |
|
88 |
# healthcheck: |
|
89 |
# test: ["CMD","curl","-S","http://localhost:9000/doc.html#/beex-api-gateway/authenticate-controller/authenticateUsingGET"] |
|
90 |
# interval: 20s |
|
91 |
# timeout: 30s |
|
92 |
# retries: 3 |
|
93 |
# start_period: 20s |