I don’t see an obvious way to pass environment variables to the dev image, maybe I am missing something? If no such mechanism exists, would Discourse be open to a PR providing the option in the boot_dev
script?
Something like:
ENV_ARGS=""
while [ "${#@}" -ne "0" ]; do
case "$1" in
# redacted for brevity
-i | --init)
initialize="initialize"
;;
-e | --env)
if [ -z "$2" ]; then
show_help
exit 0
else
ENV_ARGS="--env-file=$2"
break
fi
;;
# further redacted for brevity
docker run -d -p 1080:1080 -p 3000:3000 -v "$DATA_DIR:/shared/postgres_data:delegated" -v "$SOURCE_DIR:/src:delegated" $ENV_ARGS --hostname=discourse --name=discourse_dev --restart=always discourse/discourse_dev:release /sbin/boot