Closed m8ker closed 2 years ago
Heroku will run the app for me now, but only if I list the keys directly in the ./config/env/production/server.js file. Anyone know why Heroku isn't picking up my global variables set in my root .env file?
The issue appears to be that my .env file is in .gitignore so Heroku doesn't access it.
I'm following the official instructions to deploy my strapi starter app to Heroku. The app runs fine locally. The only thing I left out in my deployment instructions were installing the PG node module (it is already installed because my local app uses Postgresql).
Accessing the Heroku logs, I see this:
Maybe this is an important detail: I followed this process once, and everything worked. I was able to deploy to Heroku. I tried it again and it didn't work. I was thinking maybe Heroku had a problem with me re-using an app name, but I tried to name the app something different in Heroku and I still had the same error.
Is heroku looking in the wrong place for my server.js file? Should it be looking in my "./config/env/production" folder instead of my "./config" folder?
Per the instructions, here is my ./config/env/production/database.js
Here is my ./config/env/production/server.js
And here is my ./config/server.js
my package.json for good measure:
I'm running Node v14.18.3 and NPM v6.14.15