Error deploying Phoenix application in production

I tried to run the Phoenix application in production mode in VPS (in development mode in order), so after compiling my application resources, I run:

PORT=4001 MIX_ENV=prod mix phoenix.server

and I get:

** (Mix) Could not start application myapp: could not find application file: myapp.app

What should I do?

+4
source share
1 answer

With prodenviornment, you need to explicitly compile your application. It will not be automatically compiled - this is one of the parameter actions build_embedded: truein yours mix.exs.

Starting MIX_ENV=prod mix compilebefore starting should fix all problems.

+6
source

Source: https://habr.com/ru/post/1617613/


All Articles