I have successfully created two Heroku applications: my-app-prod and my-app-test. There are certain environment variables that I configured in the settings of the Heroku application. I use standard configuration files in Phoenix: config.exs, test.exs, prod.exs, dev.exs.
After setting up the my-app test in Heroku using the application variable MIX_ENV = test, it still loads the variables from prod.exs.
Are there any additional steps that I am missing so that my application uses test.exs?
I followed all the instructions here: https://hexdocs.pm/phoenix/heroku.html
When I run git push, I can test it with prod.exs based on the following output.
remote: Generated my_phoenix_app_name app remote: -----> Creating .profile.d with env vars remote: -----> Writing export for multi-buildpack support remote: -----> Executing post compile: pwd remote: /tmp/build_f5b9e6e5890fcb58b9689f433c554c6a remote: -----> Phoenix app detected remote: remote: -----> Loading configuration and environment remote: Loading config... remote: Detecting assets directory remote: * package.json found in custom directory remote: Will use phoenix configuration: remote: * assets path . remote: * mix tasks namespace phoenix remote: Will use the following versions: remote: * Node 5.3.0 remote: Will export the following config vars: remote: CLIENT_ID remote: DATABASE_URL remote: POOL_SIZE remote: SECRET_KEY_BASE remote: SHOPIFY_SECRET remote: * MIX_ENV=prod
source share