-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathenv.py
More file actions
58 lines (49 loc) · 2 KB
/
env.py
File metadata and controls
58 lines (49 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from pydantic import BaseSettings
class Settings(BaseSettings):
# APPLICATION SETTING
APP_NAME: str = "Awesome Base Architecture"
APP_DESCRIPTION: str = ("This architecture use the domain layer concept "
+ "of `laravel` from **PHP**, `rails` from "
+ "**Ruby** and `clean-architecture` from "
+ "**Golang**. <br/><br/>By using this "
+ "architecture, we hope that you don't need to "
+ "create FastApi from scratch again. <br/>So "
+ "that you can focus on your development with "
+ "our standardized pattern.<br/><br/><br/><br/>"
+ "[[Find out more]]"
+ "(https://github.com/coroo/base-architecture)")
API_PREFIX: str = "/api/v1"
APP_URL: str = "https://example.com"
APP_VERSION: str = "v1.0"
APP_HOST: str = "0.0.0.0"
APP_PORT: int = 8000
APP_MODE: str = "development"
# available in ['development','production']
LOG_LEVEL: str = "info"
# available in ['critical', 'error', 'warning', 'info', 'debug', 'trace']
SECRET_KEY: str = ""
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
# DB CONNECTION
DB_CONNECTION: str = "mysql"
DB_PORT: int = 3306
DB_HOST: str = "localhost"
DB_DATABASE: str = "db-name"
DB_USERNAME: str = "root"
DB_PASSWORD: str = "root_pass"
DB_ROOT_PASSWORD: str = ""
DB_ALLOW_EMPTY_PASSWORD: int = 1
# DB BACKUP AND RESTORE
DB_BACKUP_PATH: str = "storage/database-backup"
DB_BACKUP_TABLE_NAME: str = ""
BACKUP_RETAIN_DAYS: int = 30
DB_BACKUP_FILE_NAME: str = ""
# DOCUMENTATION
PUBLIC_URL: str = "public"
STORAGE_URL: str = "storage"
LINK_DOCS: str = "/docs"
LINK_REDOC: str = "/redoc"
# SECURITY
ALLOWED_ORIGINS: str = "http://localhost:8080,http://127.0.0.1:8080"
class Config:
env_file = ".env"
settings = Settings()