Good afternoon folks
I’ve been playing around with
LiveView for a few days now and I have to admit it’s changing my approach to many use cases for client projets!
There is one thing I can wrap my head around: configuration for the production release; let me explain…
- In our actual way of packaging releases in Docker images, following 12-Factor App principles, the
signing_saltoptions from environment variables with
LiveViewdocumentation says to extract the
@session_optionsto a module attribute…
As module attribute, options are expanded at compile time! It works locally for development purposes since the same variables are used at both compile time and runtime, but breaks during the
docker build… of the CI workflow because
SIGNING_SALT are not available!
I looked at the code in
Plug.Session to understand if there is a different way to configure the socket session callback, but came out clear the
session needs to be a Map…
Is it considered good practice to bake the session
signing_salt in a version binaries, meaning we would have to build a new Docker image to change those value?