Guides
Deployment
Deployment
Environment Variables
These keys must be present in production:
| Key | Description |
|-----|-------------|
| DATABASE_URL | PostgreSQL connection string (Pooling enabled). |
| NEXTAUTH_SECRET | OpenSSL generated random string. |
| NEXTAUTH_URL | Canonical URL of the site (https://...). |
| UPLOADTHING_SECRET | Secret for file upload services (if using UploadThing). |
| OPENAI_API_KEY | (Optional) Fallback key for AI services. |
Docker Deployment
Standard Text for optimizing Docker images:
# ... previous steps ...
# Standalone builder optimization
ENV NEXT_PRIVATE_STANDALONE true
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
EXPOSE 3000
CMD ["node", "server.js"]

