mirror of
https://github.com/ijaric/voice_assistant.git
synced 2025-05-24 14:33:26 +00:00
[#10] fix rename DB variables to -> POSTGRES
This commit is contained in:
parent
bde0f0c7e1
commit
9cabd80c9a
|
@ -1,8 +1,8 @@
|
|||
DB_HOST=db
|
||||
DB_PORT=5432
|
||||
DB_USER=user
|
||||
DB_PASSWORD=Qwe123
|
||||
DB_NAME=api_db
|
||||
POSTGRES_HOST=db
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_USER=user
|
||||
POSTGRES_PASSWORD=Qwe123
|
||||
POSTGRES_NAME=api_db
|
||||
|
||||
API_HOST=0.0.0.0
|
||||
API_PORT=8000
|
||||
|
|
|
@ -4,13 +4,13 @@ services:
|
|||
db:
|
||||
image: postgres:15.2
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_NAME}
|
||||
env_file:
|
||||
- .env
|
||||
ports:
|
||||
- "${DB_PORT}:${DB_PORT}"
|
||||
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data/
|
||||
restart: always
|
||||
|
|
|
@ -4,9 +4,9 @@ services:
|
|||
db:
|
||||
image: postgres:15.2
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_NAME}
|
||||
env_file:
|
||||
- .env
|
||||
ports:
|
||||
|
|
|
@ -7,7 +7,7 @@ import lib.app.split_settings.utils as app_split_settings_utils
|
|||
class PostgresSettings(pydantic_settings.BaseSettings):
|
||||
model_config = pydantic_settings.SettingsConfigDict(
|
||||
env_file=app_split_settings_utils.ENV_PATH,
|
||||
env_prefix="DB_",
|
||||
env_prefix="POSTGRES_",
|
||||
env_file_encoding="utf-8",
|
||||
extra="ignore",
|
||||
)
|
||||
|
@ -17,5 +17,5 @@ class PostgresSettings(pydantic_settings.BaseSettings):
|
|||
port: int = 5432
|
||||
user: str = "app"
|
||||
password: pydantic.SecretStr = pydantic.Field(
|
||||
default=..., validation_alias=pydantic.AliasChoices("password", "db_password")
|
||||
default=..., validation_alias=pydantic.AliasChoices("password", "postgres_password")
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user