From af41aee4123af17aba40962db192aedc90a2edd9 Mon Sep 17 00:00:00 2001 From: Bruce Chen <805899926@qq.com> Date: Tue, 24 Dec 2024 22:27:44 +0800 Subject: [PATCH] # fix json_path ref public_path --- asu/config.py | 6 +++++- podman-compose.yml | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/asu/config.py b/asu/config.py index ce84867f..63b42d50 100644 --- a/asu/config.py +++ b/asu/config.py @@ -54,7 +54,11 @@ class Settings(BaseSettings): model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8") public_path: Path = Path.cwd() / "public" - json_path: Path = public_path / "json" / "v1" + + @property + def json_path(self): + return self.public_path / "json" / "v1" + redis_url: str = "redis://localhost:6379" upstream_url: str = "https://downloads.openwrt.org" allow_defaults: bool = False diff --git a/podman-compose.yml b/podman-compose.yml index dd48a72f..01e50af2 100644 --- a/podman-compose.yml +++ b/podman-compose.yml @@ -12,6 +12,8 @@ services: restart: always environment: - REDIS_URL=redis://redis/ + volumes: + - $PUBLIC_PATH:$PUBLIC_PATH:rw ports: - "127.0.0.1:8000:8000" depends_on: