DEV Community

Discussion on: Deploy a Phoenix app with Docker stack

Collapse
 
voger profile image
voger

Using bash, during local migrate, I got this error

ERROR! Config provider Config.Reader failed with:
** (ArgumentError) could not fetch environment variable "SECRET_KEY_BASE" because it is not set
 ...

In bash the line

source .env
_build/prod/rel/demo/bin/demo eval Demo.Release.migrate

must be translated to

set -o allexport; source .env; set +o allexport
_build/prod/rel/demo/bin/demo eval Demo.Release.migrate

I am posting this to save time to someone who might stumble upon this problem.

Collapse
 
khosimorafo profile image
khosimorafo

Thanks for this!