代码拉取完成,页面将自动刷新
# https://github.com/Koff/alpine-python3-django-uwsgi-nginx
# Help: https://www.digitalocean.com/community/questions/flask-nginx-uwsgi-ubuntu-tutorial
# more help_ https://www.caktusgroup.com/blog/2017/03/14/production-ready-dockerfile-your-python-django-app/
# more help: https://www.digitalocean.com/community/tutorials/how-to-set-up-uwsgi-and-nginx-to-serve-python-apps-on-ubuntu-14-04
version: '3.3'
services:
python:
build:
context: ./python
ports:
- "5000:5000"
volumes:
- ./logs/app:/usr/src/app/logs
- app_src:/usr/src/app
restart: always
env_file:
- .env
depends_on:
- mongodb
mongodb:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- ./data/db:/data/db
environment:
MONGO_DATA_DIR: /data/db
MONGO_INITDB_ROOT_USERNAME: $MONGO_USERNAME
MONGO_INITDB_ROOT_PASSWORD: $MONGO_PASSWORD
MONGO_INITDB_DATABASE: $MONGO_DBNAME
restart: always
nginx:
build:
context: ./nginx
volumes:
- ./logs/nginx/:/var/log/nginx:cached
- app_src:/usr/src/app
depends_on:
- python
- mongodb
ports:
- 80:80
restart: always
volumes:
app_src:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。