feat(backend): add Docker support for self-hosting#349
Conversation
Add a multi-stage Dockerfile that runs the backend as an HTTP server (apps/backend/express.js), so cards can be served outside Vercel. The image builds the core package, produces a production-only bundle via 'pnpm deploy', and runs as a non-root user with a healthcheck against /api/status/up. - Promote express to a runtime dependency and add a 'start' script, since HTTP-server mode needs express at runtime. - Add .dockerignore, docker-compose.yml (with an optional Postgres profile) and docs/docker.md. - Postgres stays optional: without POSTGRES_URL the app renders cards with no database. - Structure leaves room for a future static-SVG generation mode. Closes stats-organization#287
|
@joaoclaudio82 is attempting to deploy a commit to the martin-mfg's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
This PR addresses #287 by adding a container image that runs the backend as an HTTP server, so the cards can be served outside Vercel. A few notes for reviewers:
I've run |
|
Hi @joaoclaudio82, thanks for the PR! Since I had already discussed with @digitaladapt that he is going to contribute Docker support to this repo, I would like to give him a bit more time to do so. Maybe he can even incorporate your work into his contribution. @digitaladapt How are you doing on the Docker PR? :) |
Add a multi-stage Dockerfile that runs the backend as an HTTP server (apps/backend/express.js), so cards can be served outside Vercel. The image builds the core package, produces a production-only bundle via 'pnpm deploy', and runs as a non-root user with a healthcheck against /api/status/up.
Closes #287