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

Bug: Dockerfile USER/PASSWORD parameters are mandatory - no way to use .netrc #309

Open
ai91 opened this issue Jan 18, 2024 · 0 comments
Open

Comments

@ai91
Copy link

ai91 commented Jan 18, 2024

Configuring secrets, but unfortunately it does work for MQTT connection only. User and password for weconnect are mandatory to be provided via environment variables in docker-compose.yml.

Starting with docker. When trying to omit USER/PASSWORD environment variables, the weconnect-mqtt fails with error message weconnect-mqtt: error: argument -u/--username: expected one argument

Configuration:
docker-compose.yml

version: '3.3'

services:
  weconnect-mqtt:
    image: "tillsteinbach/weconnect-mqtt:latest"
    restart: unless-stopped
    environment:
      - TZ=Europe/Berlin
      - LC_ALL=de_DE
      - BROKER_ADDRESS=192.168.1.200
      - ADDITIONAL_PARAMETERS=--netrc /run/secrets/weconnect_netrc
    secrets:
      - weconnect_netrc

secrets:
   weconnect_netrc:
     file: /root/secrets/weconnect_netrc

the netrc contains entries for volkswagen.de but they are not picked.

Workaround:
The only solution to make it working, is provide USER/PASSWORD explicitly in docker-compose.yml:

version: '3.3'

services:
  weconnect-mqtt:
    image: "tillsteinbach/weconnect-mqtt:latest"
    restart: unless-stopped
    environment:
      - TZ=Europe/Berlin
      - LC_ALL=de_DE
      - BROKER_ADDRESS=192.168.1.200
      - ADDITIONAL_PARAMETERS=--netrc /run/secrets/weconnect_netrc
      - USER=mysecretuser@example.com
      - PASSWORD=mysecretpassword
    secrets:
      - weconnect_netrc

secrets:
   weconnect_netrc:
     file: /root/secrets/weconnect_netrc

TODO:
make user/password paramethers optional, to allow pick values from netrc secret.

ai91 added a commit to ai91/WeConnect-mqtt that referenced this issue Jan 18, 2024
Didn't test though. But changes should handle tillsteinbach#309 I believe
@ai91 ai91 changed the title Bug: username/password commandline parameters are mandatory - no way to use .netrc Bug: Dockerfile USER/PASSWORD parameters are mandatory - no way to use .netrc Jan 18, 2024
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

No branches or pull requests

1 participant