Files
citywalk-stamp/docker-compose.yml
YANG JIANKUAN 711f422558 feat: 新增 Docker Compose 部署方案
- Dockerfile 单阶段 Alpine 镜像,使用国内镜像(npmmirror / Prisma 引擎 / apk)加速
- entrypoint 首次复制内置图章素材到 uploads volume,自动执行 prisma migrate deploy
- docker-compose.yml 绑定 127.0.0.1:3001,强制走外部 Nginx 反代
- Express 在 production 下同时托管 packages/web/dist 及 SPA fallback
- Prisma schema 增加 linux-musl 二进制目标,支持 Alpine 运行
- 新增 DEPLOY.md 部署指南,含 .env 模板与 Nginx 反代示例

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 17:04:25 +08:00

20 lines
568 B
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.

services:
app:
build: .
image: citywalk-stamp:latest
container_name: citywalk-stamp
restart: unless-stopped
# Bind to loopback only: the outside world must go through your host Nginx
# 宿主机 3001 -> 容器 30003000 已被宿主其它服务占用,例如 1Panel Gitea
ports:
- "127.0.0.1:3001:3000"
volumes:
- ./data:/app/data
- ./uploads:/app/packages/server/uploads
env_file:
- .env
environment:
NODE_ENV: production
SERVER_PORT: 3000
DATABASE_URL: file:/app/data/prod.db