Why the need for PHX_SERVER

Hey peeps, reading the following

Led me to be curious about it.

I am using mix release and at some point, I removed the check for System.get_env("PHX_SERVER") because I always had the server: true.

But then, I backtrack out of it.

Why the need for such a flag? Is this because by running some mix task or using the remote shell we don’t want to start the web server or something like that?

That is kind of my assumption, and here I am, just to make sure I cover the unknowns unknowns.

Trying to collect the information to add some Explanation to Phoenix.

As mentioned on Slack: I‘d expect this is mostly an integration with the new generated dockerfile and fly.io. There the ENV variable is automatically set, so no need for editing any config manually at all. It just works, but also isn‘t a breaking change to phoenix like starting the server automatically without the server: true config.

1 Like