Skip to content

Docker runtime

The local compose stack is optimized for development. Production should use pinned release images and durable external services.

Terminal window
vp run dev:docker:build

The compose project includes:

  • shop-postgres for local Postgres.
  • shop-db-migrate for tracked SQL migrations and seed data.
  • shop-api for the NestJS API in watch mode.
  • shop-web for Vite dev server and storefront HMR.
  • shop-mailpit for local email inspection.
  • shop-s3 and shop-s3-init for MinIO product images.

Source is bind-mounted; node_modules live in named volumes.

Build production images from the repo root:

Terminal window
docker build -f apps/api/Dockerfile --target production .
docker build -f apps/web/Dockerfile --target production .

The release updater expects published image digests, not mutable tags.

  • Postgres.
  • Public web origin.
  • API origin.
  • SMTP transport.
  • S3-compatible storage for product images.
  • Stripe credentials when PAYMENT_PROVIDER=stripe.

The safe updater starts services, runs migrations from the pinned API image, and checks API/web health before promoting the new release env.