What you’ll set up
Kan
Next.js application served on port 3000.
Migrate
One-off service that runs database migrations before web starts.
PostgreSQL 15
Primary database for Kan data.
For file uploads (avatars), OAuth, and other advanced options, see the
Environment Variables section in the README and the dedicated S3
guide. The full
compose in the
repo includes a richer configuration via
.env.Prerequisites
- Docker and Docker Compose
- A long random string for
BETTER_AUTH_SECRET(32+ chars)
Quick start
1
Create a docker-compose.yml
Paste the following minimal configuration into a new
docker-compose.yml file:2
Start the stack
Bring everything up in detached mode:The
migrate service runs the database migrations to completion before the web service starts, so once it’s up open http://localhost:3000.3
Manage the containers
Useful commands while developing or testing:
- Stop the containers:
docker compose down - View logs:
docker compose logs -f - View logs for a specific service:
docker compose logs -f webordocker compose logs -f migrate - Restart:
docker compose restart
4
Configure environment (optional)
For a production-like setup and more features (email, OAuth, file uploads, etc.), create a
.env file and set the relevant variables shown in the README’s Environment Variables section.Common variables
Common variables
If you plan to enable file uploads (avatars, etc.), you’ll also need S3 variables (
S3_ENDPOINT, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, NEXT_PUBLIC_STORAGE_URL, NEXT_PUBLIC_STORAGE_DOMAIN, …). See the S3 guide linked at the top.