Skip to Content

Docker

The project includes a production-ready multi-stage Dockerfile and a docker-compose.yml.

Build the Image

docker build -t buildpad-daas:latest .

Run with Docker Compose

Copy .env.local.example to .env and fill in your Supabase credentials, then:

docker-compose up -d

The app is available at http://localhost:3000.

Environment Variables

Pass environment variables via a .env file or directly:

docker run -d \ -p 3000:3000 \ -e NEXT_PUBLIC_SUPABASE_URL=https://xyz.supabase.co \ -e NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key \ -e SUPABASE_SERVICE_ROLE_KEY=your-service-role-key \ buildpad-daas:latest

Startup Entrypoint

The docker-entrypoint.sh script runs database migrations automatically on container start before launching the server. This ensures the schema is always up to date without manual intervention.

Migrations are idempotent — running them on a database that’s already up to date is safe.

Health Check

The Docker Compose configuration includes a health check that polls /api/health every 30 seconds.

healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', ...)"] interval: 30s timeout: 3s retries: 3

Building the Docs Site

To include the documentation site in the Docker image, see AWS Deployment for the full multi-service Compose configuration.

Last updated on