You’ve stated the obvious, but that hasn’t answered my question.
I’m not asking “what it is”, I’m asking “what’s changed” and whether using the prod.secret.exs will work. If so, how? Given that I don’t want to have to edit that code with “raise” in config/runtime.exs manually, nor remove it.
The prod.secret.exs approach never supported runtime configuration, nor did it follow common configuration conventions, which is why it has been removed from the generators. But if it worked for you before you can continue using it.
Yeah, just like previously many people removed the prod.secret.exs on every project, because it didn’t match their workflow. There’s not going to be a perfect solution for everyone. At least the current one should be fitting for a larger group of people, given it aligns more with common industry practices.
Note that I may have tens of Elixir/Phoenix applications on the same machine in production, therefore specifying env. variables in ~/.bash_profile, ~/.profile or any OS-specific, standard file absolutely won’t work for me.
There are many ways of defining env variables, which are specific to the system being executed as opposed to a user or the whole OS. E.g. in systemd you can define env variables per startable unit.
Specifying env. variables on a physical machine itself – absolutely won’t work for me.
Whereas specifying env. variables in a project/repository, in secret file(s), and adding file(s) into .gitignore – will work.
However, because of that “runtime” so-called “improvement” thing I’ll have to edit a newly generate code each time, in order to remove those “raise”. Huh?
You can’t expect Phoenix does everything for us. It just provides general solutions. If you have any special requirements which aren’t provided by Phoenix, implement it by yourself.
I already answered you in reddit but since you ask the same question it may be worth doing it here as well.
You complain that the default generated files do not correspond with what you want, but also complain that you have to make changes to the generated files to get what you want.
This is not constructive.
If you have tens of phoenix applications where changing the configuration represents a big part of the work, then I guess those applications are fairly identical, and you should quickly find a way to automate the migration from generated files to your custom configuration layout. Like cp a template secret.exs file and rm runtime.exs in a bash script.
If they are not that much identical, then changing the config, a five minutes task, should represent 0.001% of the work on those apps, and that is a thing that everyone does because in general apps require much more environment variables than those present in the default setup.
The bottom line is that as long as mix phx.new does not generate exactly what you need, you will have to do some work. This is just logical.
The config is Elixir code, you can do anything you want in there. People gave you many possible solutions in this thread. You can even keep the generated runtime.exs and create a start.sh script with a single line like this: PORT=4000 DATABASE_URL="ecto://blablabla" mix phx.server.
It has been mentioned a few times already that you can just continue to use the existing approach just fine – albeit with manually creating the config file and linking to it. It has also been mentioned that the previous approach – while fine for you – wasn’t fine for a lot of other people.
At this point I’m failing to see which point you’re trying to make tbh.
If you aren’t going to even read the links provided before complaining about them you’re going to have your posts go through a moderation queue. ConfigProvider is part of the standard library, it is not another dependency.