mirror of
https://github.com/xhongc/music-tag-web.git
synced 2026-04-25 11:11:27 +08:00
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
version: '3.7'
|
|
services:
|
|
redis:
|
|
image: redis
|
|
restart: always
|
|
django-vue-cli:
|
|
build:
|
|
context: .
|
|
dockerfile: docker_file/django_vue_cli/Dockerfile
|
|
image: "django-vue-cli"
|
|
container_name: "django-vue-cli-container"
|
|
command: bash -c "python manage.py migrate&&gunicorn -w 1 -k gevent -b 0.0.0.0:8000 django_vue_cli.wsgi:application"
|
|
depends_on:
|
|
- redis
|
|
- mysql
|
|
links:
|
|
- redis
|
|
- mysql
|
|
expose:
|
|
- "8000"
|
|
volumes:
|
|
- .:/django-vue-cli
|
|
nginx:
|
|
build:
|
|
context: .
|
|
dockerfile: docker_file/nginx/Dockerfile
|
|
image: "nginx-dv"
|
|
container_name: "nginx-dv-container"
|
|
depends_on:
|
|
- django-vue-cli
|
|
links:
|
|
- django-vue-cli
|
|
volumes:
|
|
- ./static:/home/ubuntu/static
|
|
ports:
|
|
- "80:80"
|
|
mysql:
|
|
image: mysql
|
|
container_name: mysql-with-django-vue
|
|
restart: always
|
|
environment:
|
|
- MYSQL_DATABASE=bomboo
|
|
- MYSQL_ROOT_PASSWORD=xhongc
|
|
expose:
|
|
- "3306"
|
|
ports:
|
|
- "3306:3306"
|
|
command:
|
|
- "--character-set-server=utf8mb4"
|
|
- "--collation-server=utf8mb4_unicode_ci"
|