Paulo Janeiro
Paulo Janeiro

Reputation: 3221

Error deploying Phoenix app in production

I was trying to start a Phoenix app in production mode in a VPS (in development mode is OK) so, after compiling my application assets, 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?

Upvotes: 4

Views: 935

Answers (1)

michalmuskala
michalmuskala

Reputation: 11288

With prod enviornment you need to explicitly compile your application. It won't be automatically compiled - this is one of the behaviours of the build_embedded: true option in your mix.exs.

Running MIX_ENV=prod mix compile before starting should fix all problems.

Upvotes: 6

Related Questions