Skip to content

Config: Read passwords and secrets from files #1987

Closed
@jandaa

Description

@jandaa

Is your feature request related to a problem? Please describe.

I would like to have a way to pass the admin password to Photoprism as a docker secret. The only way to set the password right now is to explicitly write out the password in the docker-compose file which is not very secure.

Describe the solution you'd like

Support passing secrets using the standard convention of passing in the secret to an environment variable with _FILE appended to it. It would look like this

photoprism:
    image: photoprism/photoprism:20220121
    secrets:
      - photoprism_admin_password
   ...
    environment:
      PHOTOPRISM_ADMIN_PASSWORD_FILE: /run/secrets/photoprism_admin_password

This can be done by modifying the entrypoint.sh file to check if its a secret or not and if it is, to cat the file to get its contents

Describe alternatives you've considered

Running from command line but this is not very maintainable or scalable.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    dockerDocker Images, Build Scripts, Config & Deployment ExamplesideaFeedback wanted / feature requestreleasedAvailable in the stable releasesecurityImpact on server or browser security

    Projects

    Status

    Release 🌈

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions