Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.shipfastai.dev/llms.txt

Use this file to discover all available pages before exploring further.

Shipfastai ships with Docker Compose configuration so you can spin up the entire stack — FastAPI backend, Next.js frontend, PostgreSQL database, and Redis — with a single command. This page walks you through starting, inspecting, and stopping your local environment, and explains how the production Compose file differs.

Starting the stack

From the root of your product directory (e.g. products/basic/ or products/pro/), run:
docker-compose up -d
Docker Compose pulls any missing images, builds the backend and frontend containers from their respective Dockerfiles, and starts all services in the background. Once the command returns, the following services are running:
ServicePortDescription
frontend3000Next.js development server
backend8000FastAPI with Uvicorn, hot-reload on
db5432PostgreSQL 15
redis6379Redis 7 for caching
The backend waits for PostgreSQL and Redis to pass their health checks before it starts, so all services are ready by the time docker-compose up -d returns.
Run docker-compose ps at any time to see the status of every service and confirm each one is healthy before you start developing.

Viewing logs

To follow the combined log output of all services:
docker-compose logs -f
To tail only the backend:
docker-compose logs -f backend
You can substitute any service name (frontend, db, redis) to isolate its output. Press Ctrl+C to stop following without stopping the containers.

Stopping the stack

To stop all containers while preserving your database volume:
docker-compose down
To stop all containers and delete all data volumes (a full reset):
docker-compose down -v
The -v flag removes the named postgres_data volume, so your database is wiped. Use this when you want a clean slate or need to re-run migrations from scratch.

Production Docker Compose

The repository also includes docker-compose.prod.yml for production deployments on a single server (e.g. a DigitalOcean Droplet or EC2 instance). It differs from the development file in several important ways:
  • No hot-reload. The backend runs Gunicorn with multiple Uvicorn workers instead of uvicorn --reload, and the frontend is served as a pre-built static bundle.
  • Pre-built images. Services reference tagged Docker images (e.g. ghcr.io/Shipfastai/backend:latest) rather than building from local source.
  • Production environment variables. APP_ENV=production, DEBUG=false, and LOG_FORMAT=json are set explicitly.
  • Nginx reverse proxy. An Nginx container handles TLS termination and routes traffic to the backend (port 8000) and frontend (port 3000) services.
  • Persistent Redis volume. Redis data is written to a named volume so it survives container restarts.
To start the production stack:
docker-compose -f docker-compose.prod.yml up -d

Rebuilding after changes

When you modify the Dockerfile or install new Python/Node dependencies, rebuild the affected image before restarting:
docker-compose up -d --build
To rebuild a single service without restarting the others:
docker-compose up -d --build backend