Skip to content

Commit

Permalink
fix: disable env prefix for settings
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumedsde committed Sep 16, 2023
1 parent 310b3ee commit 993f47b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compose.prod.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ services:
build: {}
ports: []
environment:
DHT_TORZNAB__API__KEY: ${DHT_TORZNAB__API__KEY}
API__KEY: ${API__KEY}
labels:
traefik.enable: "true"
traefik.http.routers.api.rule: "Host(`api.${DOMAIN}`)"
Expand Down
4 changes: 2 additions & 2 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ services:
migrations:
condition: service_completed_successfully
environment:
DHT_TORZNAB__PGSQL_DSN: "postgresql+asyncpg://torznab:${POSTGRES_PASSWORD:-torznab}@postgres/"
DHT_TORZNAB__BEANSTALKD_URL: "beanstalkd://beanstalkd:11300/magneticod_tube"
PGSQL_DSN: "postgresql+asyncpg://torznab:${POSTGRES_PASSWORD:-torznab}@postgres/"
BEANSTALKD_URL: "beanstalkd://beanstalkd:11300/magneticod_tube"
deploy:
resources:
limits:
Expand Down
4 changes: 3 additions & 1 deletion dht_torznab/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ class Settings(pydantic.BaseSettings):
)

class Config:
env_prefix = "DHT_TORZNAB__"
# NOTE: disabling env prefix for now due to:
# https://github.com/pydantic/pydantic/issues/3807
# env_prefix = "DHT_TORZNAB__" # noqa: ERA001
env_nested_delimiter = "__"


Expand Down

0 comments on commit 993f47b

Please sign in to comment.