Strapi + Turborepo + Heroku = Trying to load the admin from localhost?

System Information
  • Strapi Version: 4.10.1
  • Operating System: Linux (Heroku)
  • Database: postgres
  • Node Version: 16.x
  • NPM Version: 8.19.3
  • Yarn Version: 1.22.11

Hey all! I’ve got a couple Strapi apps running fine on Heroku, but I’m having a bit of an issue right now when trying to get one running using Turborepo. I can get the app to run – or at least can get the index page loaded – but the admin won’t load, because it’s always trying to load from localhost.

I’ve got NODE_ENV set to production in Heroku, and strapi start runs fine as a command in the Procfile.

My env/production/server.js is set to this:

module.exports = ({ env }) => ({ proxy: true, host: "", port: env('PORT'), url: env('BACKEND_URL'), app: { keys: env.array('APP_KEYS') }, admin: { auth: { secret: env('ADMIN_JWT_SECRET'), }, }, })

But it still always tries to load from localhost:1337. Are there any really obvious gotchas I’m missing?