Fetch the repository succeeded.
version: '3'
services:
# 前端(ready)
# nginx + vue
web:
# image: jsc_web
build: ./web
container_name: my-web
volumes:
# 挂载nginx全局配置
- $PWD/web/nginx/nginx.conf:/etc/nginx/nginx.conf
# 挂载nginx server配置
- $PWD/web/nginx/conf.d:/etc/nginx/conf.d
# 挂载nginx日志
- $PWD/web/nginx/logs:/var/log/nginx
- $PWD/web/static:/usr/share/nginx/html/static
- $PWD/web/media:/usr/share/nginx/html/media
# 挂载前端代码
- $PWD/web/code/dist:/usr/share/nginx/html
restart: always
ports:
# 容器80端口映射宿主机8080端口
- "8080:80"
- "8050:8050"
networks:
- front
- back
depends_on:
- djangoapp
# 后台(ready)
djangoapp:
# image: jsc_djangoapp
build: ./djangoapp
container_name: my-djangoapp
volumes:
# 挂载代码
- $PWD/djangoapp/code:/app
command: gunicorn --worker-class=\gevent cityplatjsc.wsgi:application -b 0.0.0.0:5001 -w 2 --reload
restart: always
ports:
- "5001:5001"
networks:
- front
- back
# 数据库(ready)
db:
image: mysql
container_name: my-db2
volumes:
# 挂载数据
- $PWD/db/data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "123456"
MYSQL_USER: 'root'
MYSQL_PASS: '123456'
restart: always
ports:
- "3306:3306"
networks:
- front
- back
networks:
front:
back:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。