🐳 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:
- Docker installed
 - Docker Compose available
 - A valid 
.envfile with your project’s environment variables 
If you don’t have one yet, start from the example:
cp example.env .envIf you want to use a local database:
cp example.env.postgres .env.postgresThen 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 builddocker compose -f docker-compose.prod.yml up -dWith database
docker compose -f docker-compose.prod-db.yml builddocker compose -f docker-compose.prod-db.yml up -dThis 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 psThen visit your app:
http://localhost:3000You should see your TeamKit application running!
Last updated on