From 07b24c1f3177c529d8c3b2e23e9e9ec61bfe1fd7 Mon Sep 17 00:00:00 2001 From: zhangqing Date: Tue, 2 Jun 2026 13:35:45 +0800 Subject: [PATCH] update --- backend/core/config.py | 4 +++- backend/docker-compose.yaml | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 backend/docker-compose.yaml diff --git a/backend/core/config.py b/backend/core/config.py index 77cc11b..43f7a35 100644 --- a/backend/core/config.py +++ b/backend/core/config.py @@ -6,6 +6,7 @@ from functools import lru_cache from pathlib import Path from typing import Optional +from urllib.parse import quote_plus from pydantic import AliasChoices, Field, model_validator from pydantic_settings import BaseSettings, SettingsConfigDict @@ -151,7 +152,8 @@ class Settings(BaseSettings): @property def db_uri_psycopg(self) -> str: """获取数据库连接 URI(psycopg 格式,用于 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 def api_address(self) -> str: diff --git a/backend/docker-compose.yaml b/backend/docker-compose.yaml new file mode 100644 index 0000000..deb2cf4 --- /dev/null +++ b/backend/docker-compose.yaml @@ -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