I’m working on adding Phoenix to an app that has previously operated without a web-server. I’m having trouble getting the release to run after deployment however.
I’ve noticed that
mix phx.gen.release does not seem to look at the
path option that are set in my
defp releases do [ my_app: [ include_executables_for: [:unix], steps: [:assemble, :tar], overlays: ["envs/", "priv/", "config/"] path: "_build/rel" ] ] end
We peg all release builds to a single directory for simplicity: all variations in our app are runtime variants, so the compiled artifact is identical between environments so there’s no need to keep them separate, and this is referenced in Terraform to stop and start the
So I have 2 questions here…
- Is the
mix phx.gen.releasestep necessary? Locally, I can set
PHX_SERVERto true and run my release with the only
mix release– Phoenix works (although I’m having trouble making this work on prod).
- Is there a
phx.gen.releasecan use? I’d like to keep the existing binary executable so we don’t need to refactor our terraform. If I omit the
pathoption, things work, but the
phx.gen.releasecreates 2 artifacts: