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

Transmission properties overwritten even when env not used #2901

Open
8 tasks done
csm10495 opened this issue Dec 8, 2024 · 0 comments
Open
8 tasks done

Transmission properties overwritten even when env not used #2901

csm10495 opened this issue Dec 8, 2024 · 0 comments

Comments

@csm10495
Copy link

csm10495 commented Dec 8, 2024

Is there a pinned issue for this?

  • I have read the pinned issues and could not find my issue

Is there an existing or similar issue/discussion for this?

  • I have searched the existing issues
  • I have searched the existing discussions

Is there any comment in the documentation for this?

  • I have read the documentation, especially the FAQ and Troubleshooting parts

Is this related to a provider?

  • I have checked the provider repo for issues
  • My issue is NOT related to a provider

Are you using the latest release?

  • I am using the latest release

Have you tried using the dev branch latest?

  • I have tried using dev branch

Docker run config used

Try this docker-compose file:

services:
  transmission-openvpn:
    image: haugene/transmission-openvpn:5.3.1
    cap_add:
        - NET_ADMIN
    volumes:
        - 'config/:/config/transmission-home'
    environment:
        - OPENVPN_PROVIDER=PIA
        - OPENVPN_CONFIG=us_west,us_las_vegas,us_california
        - OPENVPN_USERNAME=REDACTED
        - OPENVPN_PASSWORD=REDACTED!
        - TZ=America/Los_Angeles
        - PGID=1000
        - PUID=1000
    ports:
        - '9091:9091'

Current Behavior

You'll see in the logs something like:

...
transmission-openvpn-1  | Overriding rpc-password because TRANSMISSION_RPC_PASSWORD is set to [REDACTED]
transmission-openvpn-1  | Overriding rpc-port because TRANSMISSION_RPC_PORT is set to 9091
transmission-openvpn-1  | Overriding rpc-username because TRANSMISSION_RPC_USERNAME is set to
...

This leads to my config in settings.json getting overwritten, even though I didn't set those env vars, so just wanted to use my settings.json as is without modifications.

Expected Behavior

There should be a way to just use settings.json as is without any modifications.

How have you tried to solve the problem?

I looked a bit at the code, in

env_value = os.environ.get(setting_env_name)
it just fetches the env var if its set.

In the dockerfile it sets these env vars to empty string:

TRANSMISSION_RPC_PASSWORD= \
. That seems a bit wrong though, shouldn't it just not set the ENV that the user doesn't set something? That may be tough, but maybe instead the python code could just ignore empty env vars or use an eyecatcher/sentinel?

Log output

transmission-openvpn-1 | Overriding rpc-password because TRANSMISSION_RPC_PASSWORD is set to [REDACTED]
transmission-openvpn-1 | Overriding rpc-port because TRANSMISSION_RPC_PORT is set to 9091
transmission-openvpn-1 | Overriding rpc-username because TRANSMISSION_RPC_USERNAME is set to

HW/SW Environment

- OS: Windows 10x64 
- Docker: Docker Desktop 27.1.1

Anything else?

No response

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