mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-13 20:53:47 +08:00
增加容器相互之间的依赖关系
This commit is contained in:
104
docker/docker-compose.yaml
Normal file
104
docker/docker-compose.yaml
Normal file
@@ -0,0 +1,104 @@
|
||||
version: "3"
|
||||
services:
|
||||
# mysql
|
||||
geekai-mysql:
|
||||
image: registry.cn-shenzhen.aliyuncs.com/geekmaster/mysql:8.0.33
|
||||
container_name: geekai-mysql
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=mhSCk0NheGhmtsha
|
||||
ports:
|
||||
- "3307:3306"
|
||||
volumes:
|
||||
- ./conf/mysql/my.cnf:/etc/mysql/my.cnf
|
||||
- ./data/mysql/data:/var/lib/mysql
|
||||
- ./logs/mysql:/var/log/mysql
|
||||
- ./data/mysql/init.d:/docker-entrypoint-initdb.d/
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
|
||||
# redis
|
||||
geekai-redis:
|
||||
image: registry.cn-shenzhen.aliyuncs.com/geekmaster/redis:6.0.6
|
||||
restart: always
|
||||
container_name: geekai-redis
|
||||
command: redis-server --requirepass mhSCk0NheGhmtsha
|
||||
volumes:
|
||||
- ./data/redis:/data
|
||||
ports:
|
||||
- "6380:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 3s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
# xxl-job-admin:
|
||||
# container_name: geekai-xxl-job-admin
|
||||
# image: registry.cn-shenzhen.aliyuncs.com/geekmaster/xxl-job-admin:2.4.0
|
||||
# restart: always
|
||||
# ports:
|
||||
# - "8081:8080"
|
||||
# environment:
|
||||
# - PARAMS=--spring.config.location=/application.properties
|
||||
# volumes:
|
||||
# - ./logs/xxl-job:/data/applogs
|
||||
# - ./conf/xxl-job/application.properties:/application.properties
|
||||
|
||||
tika:
|
||||
image: registry.cn-shenzhen.aliyuncs.com/geekmaster/tika:latest
|
||||
container_name: geekai-tika
|
||||
restart: always
|
||||
ports:
|
||||
- "9999:9998"
|
||||
|
||||
# midjourney-proxy:
|
||||
# image: registry.cn-shenzhen.aliyuncs.com/geekmaster/midjourney-proxy:2.6.2
|
||||
# container_name: geekai-midjourney-proxy
|
||||
# restart: always
|
||||
# ports:
|
||||
# - "8082:8080"
|
||||
# volumes:
|
||||
# - ./conf/mj-proxy:/home/spring/config
|
||||
|
||||
# 后端 API 程序
|
||||
geekai-api:
|
||||
image: registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-plus-api:v4.2.0-amd64
|
||||
container_name: geekai-api
|
||||
restart: always
|
||||
depends_on:
|
||||
geekai-mysql:
|
||||
condition: service_healthy
|
||||
geekai-redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- DEBUG=false
|
||||
- LOG_LEVEL=info
|
||||
- CONFIG_FILE=config.toml
|
||||
ports:
|
||||
- "5678:5678"
|
||||
volumes:
|
||||
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
|
||||
- ./conf/config.toml:/var/www/app/config.toml
|
||||
- ./logs/app:/var/www/app/logs
|
||||
- ./static:/var/www/app/static
|
||||
- ./data/leveldb:/var/www/app/data
|
||||
|
||||
# 前端应用
|
||||
geekai-web:
|
||||
image: registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-plus-web:v4.2.0-amd64
|
||||
container_name: geekai-web
|
||||
restart: always
|
||||
depends_on:
|
||||
- geekai-api
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./logs/nginx:/var/log/nginx
|
||||
- ./conf/nginx/conf.d:/etc/nginx/conf.d
|
||||
- ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./conf/nginx/ssl:/etc/nginx/ssl
|
||||
Reference in New Issue
Block a user