Environment Variables
Markup uses environment variables for database connectivity, authentication, and application configuration. Create a.env.local file in the project root.
Full Example
Database Variables
DATABASE_URL
PostgreSQL connection string used by Prisma. Example:Format
Example Providers
Local PostgreSQL
Docker PostgreSQL
Supabase
Neon
WorkOS Variables
WORKOS_CLIENT_ID
Client ID for your WorkOS application. Example:WORKOS_API_KEY
Secret API key from the WorkOS dashboard. Example:WORKOS_COOKIE_PASSWORD
Encryption secret used for session cookies. Generate a secure value:NEXT_PUBLIC_WORKOS_REDIRECT_URI
Authentication callback URL.Local Development
Production Example
Local Development Example
Docker Example
Production Recommendations
- Never commit
.env.local - Use strong random secrets
- Store secrets in your hosting provider
- Rotate API keys periodically
- Restrict database network access
- Enable SSL for production PostgreSQL connections
Common Issues
Prisma Cannot Connect to Database
Check:- PostgreSQL is running
- Database credentials are correct
- Port is accessible
- SSL settings are configured correctly
WorkOS Redirect Errors
Ensure the callback URL matches exactly:Ignoring Environment Files
Add environment files to.gitignore: