Files
mengyaprofile/mengyaprofile-backend/docker-compose.yml
2026-05-16 19:03:34 +08:00

30 lines
935 B
YAML
Raw 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.
# 后端 API构建并后台运行
# 用法(在 mengyaprofile-backend 目录): docker compose up -d --build
# 数据持久化请把下方卷路径改成你服务器上的目录Windows 可用 WSL2 或改为命名卷)
services:
mengyaprofile-backend:
build:
context: .
dockerfile: Dockerfile
image: mengyaprofile-backend:latest
container_name: mengyaprofile-backend
restart: unless-stopped
ports:
- "1616:5000"
volumes:
# 仅持久化 SQLite 与用户上传背景图等;镜像内已带 data/logo
- /shumengya/docker/mengyaprofile-backend/data:/app/data
environment:
RUN_MODE: production
DATA_DIR: /app/data
PORT: "5000"
# 生产务必修改docker compose 可配合 .env 文件设置 ADMIN_TOKEN
# ADMIN_TOKEN: your-secret-token
networks:
- mengyaprofile-network
networks:
mengyaprofile-network:
driver: bridge