Files
vue-driven-cloud-storage/docker-compose.yml
237899745 4350113979 fix: 修复配额说明重复和undefined问题
- 在editStorageForm中初始化oss_storage_quota_value和oss_quota_unit
- 删除重复的旧配额说明块,保留新的当前配额设置显示

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:39:53 +08:00

84 lines
2.3 KiB
YAML

# ============================================
# 玩玩云 Docker Compose 配置
# ============================================
# 使用方法:
# 1. 复制 backend/.env.example 为 backend/.env 并修改配置
# 2. 运行: docker-compose up -d
# 3. 访问: http://localhost (或配置的域名)
# ============================================
version: '3.8'
services:
# ============================================
# 后端服务
# ============================================
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: wanwanyun-backend
restart: unless-stopped
environment:
- NODE_ENV=production
- PORT=40001
# 以下配置建议通过 .env 文件或环境变量设置
# - JWT_SECRET=your-secret-key
# - ADMIN_USERNAME=admin
# - ADMIN_PASSWORD=admin123
env_file:
- ./backend/.env
volumes:
# 数据持久化
- ./backend/data:/app/data
- ./backend/storage:/app/storage
networks:
- wanwanyun-network
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:40001/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# ============================================
# Nginx 前端服务
# ============================================
nginx:
image: nginx:alpine
container_name: wanwanyun-nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
# 前端静态文件
- ./frontend:/usr/share/nginx/html:ro
# Nginx 配置
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
# SSL 证书(如有)
- ./nginx/ssl:/etc/nginx/ssl:ro
# Let's Encrypt 证书目录(可选)
# - /etc/letsencrypt:/etc/letsencrypt:ro
# - ./certbot/www:/var/www/certbot:ro
depends_on:
- backend
networks:
- wanwanyun-network
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost/"]
interval: 30s
timeout: 10s
retries: 3
networks:
wanwanyun-network:
driver: bridge
# ============================================
# 可选: 数据卷(用于更持久的数据存储)
# ============================================
# volumes:
# wanwanyun-data:
# wanwanyun-storage: