Deployment

Kanbots production uses one Next.js application behind Caddy.

Domains

  • kanbots.ru serves the public website.
  • www.kanbots.ru redirects to kanbots.ru.
  • app.kanbots.ru serves the authenticated app and API routes.
  • docs.kanbots.ru serves the Nextra documentation.
  • app.kanbots.ru/admin serves the operator admin surface.

Runtime URLs

Production env should define:

APP_URL=https://app.kanbots.ru APP_DOMAIN=app.kanbots.ru MARKETING_URL=https://kanbots.ru MARKETING_DOMAIN=kanbots.ru DOCS_URL=https://docs.kanbots.ru DOCS_DOMAIN=docs.kanbots.ru

AUTH_URL remains https://app.kanbots.ru because authentication callbacks belong to the app host.

Admin access

Admin UI stays under app.kanbots.ru so it can reuse the existing Auth.js session cookie. Access has two gates:

  • Caddy only forwards /admin* when the client IP is listed in the server-local admin-allowlist.caddy file.
  • The application only renders /admin for users with database role ADMIN.

Use the update-admin-allowlist GitHub Actions workflow to update allowed CIDRs without redeploying the app.

Setup guide removal

The previous in-app guide at /agents-guide is replaced by this docs site. Requests to /agents-guide redirect to /agents/setup on the docs host.

Deployment