Complete Docker compose deployment setup

- Add an API container entrypoint that waits for PostgreSQL, runs Prisma migrations, seeds demo data, and then starts NestJS.

- Keep Prisma CLI and seed dependencies available in the API runtime image and copy seed source dependencies into the container.

- Add Docker Compose healthchecks and health-based startup ordering for PostgreSQL, API, and Nginx web services.

- Add Docker initialization environment switches for migrations, seed, and startup retries.

- Add a dedicated Docker deployment guide covering services, ports, initialization, HTTPS, production variables, backup, restore, and troubleshooting.

- Update README, AGENTS, installation, deployment, progress, and environment example docs for the Dockerized workflow.
This commit is contained in:
2026-05-02 05:38:03 +08:00
parent 2cabe7e4fd
commit 5d936832da
12 changed files with 269 additions and 8 deletions

View File

@@ -6,5 +6,9 @@ DATABASE_URL="postgresql://surclaw:surclaw_dev_password@localhost:5433/surclaw?s
SESSION_SECRET="change-me-in-production"
SESSION_COOKIE_SECURE="false"
FILE_STORAGE_DIR="./uploads"
RUN_DB_MIGRATIONS="true"
RUN_DB_SEED="true"
DOCKER_STARTUP_RETRIES=30
DOCKER_STARTUP_RETRY_DELAY=2
VITE_API_PROXY_TARGET="http://localhost:3100"
VITE_ENABLE_LOCAL_FALLBACK="true"