Deployment
The Showcase website is deployed as a Docker container, often alongside the rest of the stack, but it can be standalone.
Docker Strategy
We use a Multi-stage Build to keep the image light (standalone output of Next.js).
The Migration Sidecar
One particularity of this project is the migrate service in docker-compose.yml.
migrate:
command: ["npx", "prisma", "db", "push"]
restart: "no"
- Why?: We use
prisma db pushinstead ofmigrate deploybecause we are often in prototyping mode for the blog schema. - Workflow:
- The
migratecontainer starts. - It pushes the schema to MariaDB.
- It exits with code 0.
- The
webcontainer waits formigrateto complete successfully before starting.
- The
Environment Variables
| Variable | Description |
|---|---|
DATABASE_URL | Connection string to MariaDB (mysql://...) |
SMTP_HOST | Mail server (e.g., smtp.gmail.com) |
SMTP_USER | Email address for sending contact forms |
NEXT_PUBLIC_ACKEE_DOMAIN | URL of the Ackee instance |