mirror of
https://github.com/niezhicheng/pveui.git
synced 2026-05-09 07:08:22 +08:00
40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
# 本版本是抢先体验版本专门为运维人员优化版本
|
|
version: '3.8'
|
|
|
|
services:
|
|
# Django 后端服务
|
|
backend:
|
|
image: registry.cn-beijing.aliyuncs.com/yuanbuluo/pveui:backendv1
|
|
container_name: django-vue-adminx-backend1
|
|
restart: always
|
|
privileged: true
|
|
environment:
|
|
- AUTOBAHN_USE_UVLOOP=0
|
|
- TWISTED_REACTOR=asyncio
|
|
command: >
|
|
sh -c "python manage.py makemigrations &&
|
|
python manage.py migrate --noinput &&
|
|
python manage.py init_rbac --reset &&
|
|
python manage.py init_rbac --create-superuser 2>/dev/null || true &&
|
|
daphne -b 0.0.0.0 -p 8000 django_vue_adminx.asgi:application"
|
|
volumes:
|
|
# 数据持久化卷
|
|
#- ./db.sqlite3:/app/db.sqlite3:rw
|
|
- /etc/machine-id:/host/etc/machine-id:ro
|
|
- /var/lib/dbus/machine-id:/host/var/lib/dbus/machine-id:ro
|
|
- /sys/class/dmi/id/product_uuid:/host/sys/dmi/product_uuid:ro
|
|
- /proc/cpuinfo:/host/proc/cpuinfo:ro
|
|
- /proc/sys/kernel/random/boot_id:/host/proc/boot_id:ro
|
|
- /etc/hostid:/host/etc/hostid:ro
|
|
- /sys/class/net/:/host/sys/class/net/:ro
|
|
# ports:
|
|
# - "8001:8000"
|
|
|
|
# Vue 前端服务
|
|
frontend:
|
|
image: registry.cn-beijing.aliyuncs.com/yuanbuluo/pveui:front-endv1
|
|
container_name: django-vue-adminx-frontend1
|
|
ports:
|
|
- "8013:80"
|
|
depends_on:
|
|
- backend |