Files
mwy/docker-compose.yml
flower_linux 6cc3fdf411 mwy2.0
2026-05-20 16:31:07 +08:00

44 lines
1.2 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 一键启动docker compose up --build
# 前端 http://localhost:8080 后端管理 http://localhost:8963/admin/
# 内网穿透cp .env.example .env 并填写后执行 docker compose --profile frp up -d
services:
backend:
build: ./backend
ports:
- "8963:8963"
volumes:
- backend_data:/data
environment:
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY:-dev-secret-change-me}
DJANGO_DEBUG: "false"
DJANGO_ALLOWED_HOSTS: localhost,127.0.0.1,backend,${FRP_CUSTOM_DOMAIN:-}
CORS_ALLOWED_ORIGINS: http://localhost:8080,http://127.0.0.1:8080,${FRP_PUBLIC_ORIGIN:-}
CSRF_TRUSTED_ORIGINS: http://localhost:8080,http://127.0.0.1:8080,${FRP_PUBLIC_ORIGIN:-}
SQLITE_PATH: /data/db.sqlite3
MEDIA_ROOT: /data/media
frontend:
build: ./frontend
ports:
- "8080:80"
depends_on:
- backend
frpc:
image: snowdreamtech/frpc:0.61
restart: unless-stopped
depends_on:
- frontend
volumes:
- ./frpc/frpc.toml:/etc/frp/frpc.toml:ro
environment:
FRP_SERVER_ADDR: ${FRP_SERVER_ADDR:-}
FRP_SERVER_PORT: ${FRP_SERVER_PORT:-7000}
FRP_TOKEN: ${FRP_TOKEN:-}
FRP_CUSTOM_DOMAIN: ${FRP_CUSTOM_DOMAIN:-}
profiles:
- frp
volumes:
backend_data: