Skip to main content
This approach hosts the long-running Chartbrew API on Heroku and the static client on Vercel. It also needs a MySQL or PostgreSQL database and Redis.

Before you use the older tutorial

The original Heroku and Vercel tutorial predates the current deployment guides. It is not a verified v6 procedure. Check these requirements before you adapt it:
  • Use the Node.js version required by the source guide.
  • Keep the API running so that scheduled jobs can execute.
  • Set NODE_ENV=production, bind the API to 0.0.0.0, and map Heroku’s assigned PORT to CB_API_PORT in the start command.
  • Configure the separate CB_DB_* and CB_REDIS_* values. Do not assume provider connection URLs are read automatically.
  • Keep the complete repository during installation and builds because both applications use shared files.
  • Install Chromium and its system dependencies for image rendering, and verify that the runtime can find the browser.
  • Serve the client build from client/dist and configure a fallback to index.html for client routes.
  • Set the public VITE_APP_CLIENT_HOST and VITE_APP_API_HOST before the client build.
Heroku’s filesystem is ephemeral. Files written by the application do not provide durable upload storage across restarts or deployments. Review Heroku’s filesystem documentation before using features that write to server/uploads. If you need persistent local uploads without changing the application, use a VPS with the Docker guide. For any deployment, complete the deployment checks.