Files
xfc_server/docker-compose.yml

92 lines
2.6 KiB
YAML
Raw Normal View History

2026-01-15 17:45:29 +08:00
version: "3"
services:
mysql:
image: mysql:8.0.34
2026-01-17 18:29:20 +08:00
container_name: xfc_mysql
2026-01-15 17:45:29 +08:00
environment:
# 时区上海 - Time zone Shanghai (Change if needed)
TZ: Asia/Shanghai
# root 密码 - root password
2026-01-17 18:29:20 +08:00
MYSQL_ROOT_PASSWORD: xfcyfg87gyuYiy1
MYSQL_DATABASE: xfc
MYSQL_USER: xfc
MYSQL_PASSWORD: xfc5vg67b3UNHu8
2026-01-15 17:45:29 +08:00
ports:
2026-01-17 18:29:20 +08:00
- "23201:3306"
2026-01-15 17:45:29 +08:00
volumes:
# 数据挂载 - Data mounting
- ./data/mysql/data:/var/lib/mysql
# 日志
command:
# 将mysql8.0默认密码策略 修改为 原先 策略 (mysql8.0对其默认策略做了更改 会导致密码无法匹配)
# Modify the Mysql 8.0 default password strategy to the original strategy (MySQL8.0 to change its default strategy will cause the password to be unable to match)
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
privileged: true
restart: always
networks:
2026-01-17 18:29:20 +08:00
- xfc_net
2026-01-15 18:24:55 +08:00
2026-01-15 17:45:29 +08:00
redis:
image: redis:7.4.0
2026-01-17 18:29:20 +08:00
container_name: xfc_redis
2026-01-15 17:45:29 +08:00
ports:
2026-01-15 17:57:52 +08:00
- "22202:6379"
2026-01-15 17:45:29 +08:00
environment:
# 时区上海 - Time zone Shanghai (Change if needed)
TZ: Asia/Shanghai
volumes:
# 数据文件 - data files
- ./data/redis/data:/data:rw
2026-01-17 18:29:20 +08:00
command: "redis-server --requirepass xfc3m3WsgyCKWqz --appendonly yes"
2026-01-15 17:45:29 +08:00
privileged: true
restart: always
networks:
2026-01-17 18:29:20 +08:00
- xfc_net
2026-01-15 17:45:29 +08:00
asynqmon:
image: hibiken/asynqmon:latest
2026-01-17 18:29:20 +08:00
container_name: xfc_asynqmon
2026-01-15 17:45:29 +08:00
ports:
2026-01-15 17:57:52 +08:00
- "22203:8080"
2026-01-15 17:45:29 +08:00
environment:
- TZ=Asia/Shanghai
command:
2026-01-17 18:29:20 +08:00
- "--redis-addr=xfc_redis:6379"
- "--redis-password=xfc3m3WsgyCKWqz"
2026-01-15 17:45:29 +08:00
restart: always
networks:
2026-01-17 18:29:20 +08:00
- xfc_net
2026-01-15 17:45:29 +08:00
depends_on:
- redis
main:
2026-01-17 18:29:20 +08:00
container_name: xfc_main
2026-01-15 17:45:29 +08:00
build:
context: .
dockerfile: app/main/api/Dockerfile
ports:
2026-01-15 17:57:52 +08:00
- "22204:8888"
2026-01-15 17:45:29 +08:00
volumes:
- ./data/authorization_docs:/app/data/authorization_docs:rw
environment:
- TZ=Asia/Shanghai
- ENV=production
depends_on:
- mysql
- redis
networks:
2026-01-17 18:29:20 +08:00
- xfc_net
2026-01-15 17:45:29 +08:00
restart: always
networks:
2026-01-17 18:29:20 +08:00
xfc_net:
2026-01-15 17:45:29 +08:00
driver: bridge
2026-01-15 18:24:55 +08:00