prod.secret.exs is not added to the git repository by default.
This is a good thing.
The problem is that when a repository is cloned, prod.secret.exs is missing.
The file can usually be copied over, but this is a hassle when possible.
I’m sure there are people out there who can type up a new prod.secret.exs from scratch.
I want an easier path.
This post covers adding a prod.secret.exs.example file to a project.
This file can be used to regenerate prod.secret.exs with a new
Create a new project.
Create a git repository and add the project to it.
Copy config/prod.secret.exs to config/prod.secret.exs.example.
Change the secret_key_base to a value that is not sensitive.
It should be a value that can easily be replaced by sed.
config/prod.secret.exs.example partial listing
Add config/prod.secret.exs.example to git.
config/prod.secret.exs can be regenerated with the following commands