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
|
POSTGRES_HOST=db
|
||||||
DB_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
DB_USER=user
|
POSTGRES_USER=user
|
||||||
DB_PASSWORD=Qwe123
|
POSTGRES_PASSWORD=Qwe123
|
||||||
DB_NAME=api_db
|
POSTGRES_NAME=api_db
|
||||||
|
|
||||||
API_HOST=0.0.0.0
|
API_HOST=0.0.0.0
|
||||||
API_PORT=8000
|
API_PORT=8000
|
||||||
|
|
|
@ -4,13 +4,13 @@ services:
|
||||||
db:
|
db:
|
||||||
image: postgres:15.2
|
image: postgres:15.2
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: ${DB_USER}
|
POSTGRES_USER: ${POSTGRES_USER}
|
||||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
POSTGRES_DB: ${DB_NAME}
|
POSTGRES_DB: ${POSTGRES_NAME}
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
ports:
|
ports:
|
||||||
- "${DB_PORT}:${DB_PORT}"
|
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data/
|
- postgres_data:/var/lib/postgresql/data/
|
||||||
restart: always
|
restart: always
|
||||||
|
|
|
@ -4,9 +4,9 @@ services:
|
||||||
db:
|
db:
|
||||||
image: postgres:15.2
|
image: postgres:15.2
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: ${DB_USER}
|
POSTGRES_USER: ${POSTGRES_USER}
|
||||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
POSTGRES_DB: ${DB_NAME}
|
POSTGRES_DB: ${POSTGRES_NAME}
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -7,7 +7,7 @@ import lib.app.split_settings.utils as app_split_settings_utils
|
||||||
class PostgresSettings(pydantic_settings.BaseSettings):
|
class PostgresSettings(pydantic_settings.BaseSettings):
|
||||||
model_config = pydantic_settings.SettingsConfigDict(
|
model_config = pydantic_settings.SettingsConfigDict(
|
||||||
env_file=app_split_settings_utils.ENV_PATH,
|
env_file=app_split_settings_utils.ENV_PATH,
|
||||||
env_prefix="DB_",
|
env_prefix="POSTGRES_",
|
||||||
env_file_encoding="utf-8",
|
env_file_encoding="utf-8",
|
||||||
extra="ignore",
|
extra="ignore",
|
||||||
)
|
)
|
||||||
|
@ -17,5 +17,5 @@ class PostgresSettings(pydantic_settings.BaseSettings):
|
||||||
port: int = 5432
|
port: int = 5432
|
||||||
user: str = "app"
|
user: str = "app"
|
||||||
password: pydantic.SecretStr = pydantic.Field(
|
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