Skip to content

More docker-friendly configuration. #206

@vvalchev

Description

@vvalchev

I'm using the docker-compose version with slight modification to deploy using docker-compose. I'm using ssh context (see https://blog.mikesir87.io/2019/08/using-ssh-connections-in-docker-contexts/).

That's equivalent of remote docker engine. And though I do that regularly on my developer machine, it is almost the same if i'm going for completely automated solution.

Anyway, it seems configuration is done via mounting a volume, and the mounted file contains all - including credentials. There are two problems with that:

  • mounting local volumes doesn't work with remote docker engine (unless file is copied there)
  • it is extremely unsecure to put credentials in unencrypted files.

It would be better if the whole configuration can be made via environment variables. This requires a slight change in the
load-config script:

From:

if [[ -v CONFIG_FILE ]]; then
    set -o allexport

    source $CONFIG_FILE # Source the configuration file.

    # Now set defaults if needed...

If should become:

if [[ -v CONFIG_FILE ]]; then
    set -o allexport

    source $CONFIG_FILE # Source the configuration file.

fi

# Now set defaults if needed...

E.g setting defaults should be outside the file section.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions