Skip to content

Commit

Permalink
Added default database_url and redis_url for the GitHub tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpro2022 committed Dec 8, 2023
1 parent 32a29c9 commit 9c19bf6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file='.env', env_file_encoding='utf-8')
model_config = SettingsConfigDict(env_file='.env', env_file_encoding='utf-8', extra='ignore')

# constants
URL_PREFIX: str = '/api/v1/'
Expand All @@ -16,7 +16,7 @@ class Settings(BaseSettings):
app_title: str = DEFAULT_STR
app_description: str = DEFAULT_STR
secret_key: SecretStr = DEFAULT_STR
database_url: str = DEFAULT_STR
database_url: str = 'sqlite+aiosqlite:///./fastapi.db' # for GitHub tests

# authentication
admin_email: EmailStr = 'adm@adm.com'
Expand All @@ -32,7 +32,7 @@ class Settings(BaseSettings):
content_max_length: int = 5000

# cache
redis_url: str = DEFAULT_STR
redis_url: str = 'redis://redis:6379' # for GitHub tests
redis_expire: int = 3600
redis_prefix: str = 'post:'

Expand Down
1 change: 0 additions & 1 deletion env_example
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ POSTGRES_PASSWORD=postgres
POSTGRES_HOST=db
POSTGRES_PORT=5432
DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
#DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/postgres

REDIS_PORT=6379
REDIS_URL=redis://redis:${REDIS_PORT}
Expand Down

0 comments on commit 9c19bf6

Please sign in to comment.