Skip to Content
DeploymentDocker Deployment

🐳 Deploy with Docker

TeamKit comes with a ready-to-use Docker setup for production.
You just need to configure your environment and build the containers.


⚙️ Prerequisites

Before deploying, ensure you have:

If you don’t have one yet, start from the example:

cp example.env .env

If you want to use a local database:

cp example.env.postgres .env.postgres

Then fill in your credentials, database URL, and other required values.

⚠️ Local Database Notes

  • If using a local database, disable Prisma Accelerate in lib/prisma.ts.

⚙️ Next.js Configuration

Ensure your next.config.js includes standalone output for Docker:

import nextra from 'nextra'; /** @type {import('next').NextConfig} */ const nextConfig = { output: 'standalone' as const // Ensures Next.js builds a standalone app }; const withNextra = nextra({ latex: true, search: { codeblocks: false }, contentDirBasePath: '/docs' }); export default withNextra(nextConfig);

This allows Docker to run your app as a single optimized build, improving startup speed and container efficiency.

🚀 Build and Deploy

Without database (app only)

docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d

With database

docker compose -f docker-compose.prod-db.yml build
docker compose -f docker-compose.prod-db.yml up -d

This will:

  • Build the Next.js app for production
  • Start all required services defined in the compose file
  • Run the containers in detached mode (-d)

🔍 Verify Deployment

Check running containers:

docker ps

Then visit your app:

http://localhost:3000

You should see your TeamKit application running!

Last updated on