代码拉取完成,页面将自动刷新
同步操作将从 wu-clan/DBlog 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
version: "3.8"
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: "dblog_server"
restart: always
depends_on:
- mysql
- redis
volumes:
- ./docker_settings.py:/blog_web/djangoProject/settings.py
- blog_static:/blog_web/static
- blog_templates:/blog_web/templates
networks:
- blog_network
command:
- bash
- -c
- |
wait-for-it -s dblog_mysql:3306 -s dblog_redis:6379 -t 300
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic --noinput
uwsgi --ini docker_uwsgi.ini
mysql:
image: mysql:8.0.29
ports:
- "3306:3306"
container_name: "dblog_mysql"
restart: always
environment:
MYSQL_DATABASE: blog
MYSQL_ROOT_PASSWORD: 123456
TZ: Asia/Shanghai
volumes:
- /var/lib/mysql
networks:
- blog_network
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--lower_case_table_names=1
redis:
image: redis:6.2.7
ports:
- "6379:6379"
container_name: "dblog_redis"
restart: always
environment:
- TZ=Asia/Shanghai
volumes:
- /var/lib/redis
networks:
- blog_network
nginx:
image: nginx
ports:
- "8000:80"
container_name: "dblog_nginx"
restart: always
depends_on:
- app
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- blog_static:/www/blog/static
- blog_templates:/www/blog/templates
networks:
- blog_network
networks:
blog_network:
volumes:
blog_static:
blog_templates:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。