Files
mengyaconnect/mengyaconnect-backend/docker-compose.yml
2026-05-16 19:19:39 +08:00

25 lines
713 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.
version: "3.9"
services:
backend:
# 镜像在构建阶段按宿主机架构编译;勿写死 platform: linux/amd64否则 ARM 云主机无 QEMU 时会 exec format error
build:
context: .
dockerfile: Dockerfile
container_name: mengyaconnect-backend
environment:
# 后端监听端口
- PORT=8080
# 数据目录(容器内),会挂载到宿主机目录
- DATA_DIR=/app/data
# 可按需放开 CORS / WebSocket 来源
- ALLOWED_ORIGINS=*
ports:
# 宿主机 2431 → 容器 8080
- "2431:8080"
volumes:
# 持久化数据目录
- /shumengya/docker/mengyaconnect-backend/data/:/app/data
restart: unless-stopped