Skip to main content

Building Your Project’s Image

Every create-spree-app project builds into a single production image: the web server and background jobs run in one container, and the only dependency is a PostgreSQL database (the single-node topology). If you haven’t ejected yet, do that first:
This generates the app source — including its production Dockerfile — in backend/. Make your customizations, then build:
Or with plain Docker, from the project root:
Both produce the same image — and it’s exactly what Render and Railway build from your repository. Migrations run automatically on boot.

Running the Image

One app container plus Postgres is a complete deployment:
docker-compose.yml
Start everything:
The database is created and migrated on first boot. The app is available at http://localhost:3000.

Scaling out the worker

Background jobs run inside the web container by default. When job load deserves its own process, split it out — same image, no rebuild: set SOLID_QUEUE_IN_PUMA: "false" on web and add a worker service:

Required Environment Variables

See Environment Variables for the full list.

Official Docker Image

To run Spree without any customizations, pull the prebuilt multi-arch image (linux/amd64 and linux/arm64) published to the GitHub Container Registry on every release:
Browse all tags on the GitHub Packages page. The image drops into the compose file above in place of your custom tag.