Skip to content

Commit

Permalink
add ttl to env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
matyson committed Apr 25, 2024
1 parent 8fc70e9 commit 47000fd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM python:3.12-slim
ENV PYTHON_ENV=production
ARG API_TOKEN
ARG HOSTNAME
ARG BOARD_TTL

WORKDIR /code

Expand Down
3 changes: 2 additions & 1 deletion app/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env")
python_env: str = "development"
hostname: str = "localhost"
api_token: list[str]
api_token: list[str]
board_ttl: int = 300
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


hostname = config.hostname
ttl = 300
ttl = config.board_ttl
get, get_all, set, remove, contains = create_mobius(ttl)


Expand Down
1 change: 1 addition & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
environment:
- HOSTNAME=${HOSTNAME}
- API_TOKEN=${API_TOKEN}
- BOARD_TTL=${BOARD_TTL}
reverse-proxy:
image: nginx:alpine
container_name: reverse-proxy
Expand Down

0 comments on commit 47000fd

Please sign in to comment.