Building the image
The Dockerfile has two stages:
- frontend-build (
node:20-alpine): installs the frontend dependencies and runsvite build. - runtime (
node:20-alpine): installs production backend dependencies, copiesbackend/srcand puts the built frontend in./public. It runsnode src/index.json port 3001.
Build locally
Section titled “Build locally”docker build -t pethealth:dev .docker run --rm -p 3000:3001 -e JWT_SECRET=dev pethealth:devPublish
Section titled “Publish”The official image is martitoci/pethealth, built for linux/amd64. From any machine, including Apple Silicon:
docker buildx build --platform linux/amd64 \ -t martitoci/pethealth:latest --push .To build for other architectures (e.g. a Raspberry Pi), build on that machine or add --platform linux/arm64. better-sqlite3 compiles natively, so cross-building ARM under emulation is slow but works.