-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
34 lines (25 loc) · 1021 Bytes
/
config.py
File metadata and controls
34 lines (25 loc) · 1021 Bytes
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
import os
from dotenv import load_dotenv
# Load environment variables from a .env file
load_dotenv(".env")
class Config:
DEBUG = False
# AWS
AWS_ACCESS_KEY_ID = os.getenv("AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY = os.getenv("AWS_SECRET_ACCESS_KEY")
AWS_REGION = os.getenv("AWS_DEFAULT_REGION")
S3_BUCKET_NAME = os.getenv("S3_BUCKET_NAME")
# MySQL
MYSQL_HOST = os.getenv("MYSQL_HOST", "tokenus-mysql-flask")
MYSQL_PORT = int(os.getenv("MYSQL_PORT", 3307))
MYSQL_USER = os.getenv("FLASK_DB_USER", "root")
MYSQL_PASSWORD = os.getenv("FLASK_DB_PASSWORD", "")
MYSQL_DATABASE = os.getenv("FLASK_DB_NAME", "")
# Spring Boot Server URL
BACKEND_URL = os.getenv("BACKEND_URL", "")
API_PATH = os.getenv("API_PATH", "")
# FAISS Storage Path
FAISS_INDEX_PATH = os.getenv("FAISS_INDEX_PATH", "faiss_index/faiss.index")
# Download Folder
DOWNLOAD_FOLDER = os.getenv("DOWNLOAD_FOLDER", "downloads")
FLASK_PORT = int(os.getenv("FLASK_PORT", 5000))