Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support docker secrets for username and password #309

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

DennisGaida
Copy link
Contributor

I don't like confidential data just hanging around in environment variables, especially for security related products. That's what docker secrets were made for to make things a bit better.

With this PR you can use docker secrets to set the USERNAME and PASSWORD using USERNAME_FILE and PASSWORD_FILE respectively. The files just contain the plaintext username or password. The traditional way of just using USERNAME and/or PASSWORD still works.

A full docker compose example:

docker-compose.yml

secrets:
  eufy-security-ws_password:
    file: <secretsmount>/eufy-security-ws_password
  eufy-security-ws_username:
    file: <secretsmount>/eufy-security-ws_username

services:
  eufy-security-ws:
    image: bropat/eufy-security-ws:latest
    container_name: eufy-security-ws
    network_mode: host
    volumes:
      - ./data:/data
    environment:
      USERNAME_FILE: /run/secrets/eufy-security-ws_username
      PASSWORD_FILE: /run/secrets/eufy-security-ws_password
    secrets:
      - eufy-security-ws_username
      - eufy-security-ws_password

$ cat eufy-security-ws_username as an example

emailaddress@example.com

I don't like confidential data just hanging around in environment variables, especially for security related products.
@bropat bropat changed the base branch from master to develop March 7, 2024 16:49
@bropat bropat merged commit 01659db into bropat:develop Mar 7, 2024
@DennisGaida DennisGaida deleted the patch-1 branch March 7, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants