This commit is contained in:
zhangqing 2026-06-02 13:35:45 +08:00
parent 2014daee67
commit 07b24c1f31
2 changed files with 14 additions and 1 deletions

View File

@ -6,6 +6,7 @@
from functools import lru_cache from functools import lru_cache
from pathlib import Path from pathlib import Path
from typing import Optional from typing import Optional
from urllib.parse import quote_plus
from pydantic import AliasChoices, Field, model_validator from pydantic import AliasChoices, Field, model_validator
from pydantic_settings import BaseSettings, SettingsConfigDict from pydantic_settings import BaseSettings, SettingsConfigDict
@ -151,7 +152,8 @@ class Settings(BaseSettings):
@property @property
def db_uri_psycopg(self) -> str: def db_uri_psycopg(self) -> str:
"""获取数据库连接 URIpsycopg 格式,用于 checkpointer""" """获取数据库连接 URIpsycopg 格式,用于 checkpointer"""
return f"postgresql://{self.db_user}:{self.db_password}@{self.db_host}:{self.db_port}/{self.db_name}?sslmode=disable" encoded_password = quote_plus(self.db_password)
return f"postgresql://{self.db_user}:{encoded_password}@{self.db_host}:{self.db_port}/{self.db_name}?sslmode=disable"
@property @property
def api_address(self) -> str: def api_address(self) -> str:

View File

@ -0,0 +1,11 @@
services:
huoyan-enterprise-backend:
build:
context: .
dockerfile: Dockerfile
image: registry.cn-hangzhou.aliyuncs.com/qing358/zlsj-huoyan-enterprise-backend-viersin:${ENTERPRISE_BACKEND_VERSION:-latest}
env_file:
- .env
ports:
- "7862:7862"
restart: unless-stopped