代码拉取完成,页面将自动刷新
同步操作将从 花菜/AnotherFasterRunner 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
version: '3.8'
# 用来快速启动测试平台的前后端,mq和db
# 默认会拉取dockerhub最新的镜像,不会用到本地的代码构建
# 仅适用想快速体验测试平台和一直使用最新版的用户,不适合二开
x-env: &env
# db
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_HOST: ${MYSQL_HOST:-db}
MYSQL_PORT: ${MYSQL_PORT:-3306}
# mq
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
MQ_PORT: ${MQ_PORT}
MQ_HOST: ${MQ_HOST:-mq}
MQ_ADMIN_PORT: ${MQ_ADMIN_PORT}
MQ_VHOST: ${MQ_VHOST:-/}
# celery-worker
SERVER_IP: ${SERVER_IP}
DJANGO_API_PORT: ${DJANGO_API_PORT}
# app
EMAIL_HOST: ${EMAIL_HOST}
EMAIL_PORT: ${EMAIL_PORT}
EMAIL_HOST_USER: ${EMAIL_HOST_USER}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
services:
app:
image: rikasai/fast-runner-backend:latest
environment:
<<: *env
entrypoint: /app/start.sh
command: "app"
restart: always
depends_on:
- db
- mq
celery-worker:
image: rikasai/fast-runner-backend:latest
environment:
<<: *env
entrypoint: /app/start.sh
command: "celery-worker"
restart: always
celery-beat:
image: rikasai/fast-runner-backend:latest
environment:
<<: *env
entrypoint: /app/start.sh
command: "celery-beat"
restart: always
depends_on:
- db
- mq
# django-admin & app proxy
nginx:
build: ./nginx-remote
ports:
- "${DJANGO_ADMIN_PORT}:8000"
depends_on:
- app
restart: always
environment:
<<: *env
web:
image: rikasai/fast-runner-frontend:latest
ports:
- "${WEB_PORT}:80"
depends_on:
- app
db:
#image: mysql:8.0.21
image: mariadb:10.6.1
# privileged: true
environment:
# 设置默认数据库和root默认密码,如果宿主机中/var/lib/mysql已经存在,这两个设置都不会生效
<<: *env
volumes:
# - "/var/lib/mysql:/var/lib/mysql" # 挂载宿主机的mysql数据到docker中
- ./db/my.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
- ./db:/docker-entrypoint-initdb.d/:ro
# 端口映射,格式 宿主机端口:容器端口
ports:
- "${MYSQL_PORT_OUT}:3306"
restart: always
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
mq:
image: rabbitmq:management-alpine
environment:
<<: *env
restart: always
ports:
- "${MQ_ADMIN_PORT}:15672"
- "${MQ_PORT}:5672"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。