mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-06-04 00:47:26 +08:00
feat(database): add PostgreSQL support and fix Windows subprocess encoding
This commit is contained in:
@@ -37,7 +37,7 @@ mysql_db_config = {
|
||||
|
||||
|
||||
# redis config
|
||||
REDIS_DB_HOST = "127.0.0.1" # your redis host
|
||||
REDIS_DB_HOST = os.getenv("REDIS_DB_HOST", "127.0.0.1") # your redis host
|
||||
REDIS_DB_PWD = os.getenv("REDIS_DB_PWD", "123456") # your redis password
|
||||
REDIS_DB_PORT = os.getenv("REDIS_DB_PORT", 6379) # your redis port
|
||||
REDIS_DB_NUM = os.getenv("REDIS_DB_NUM", 0) # your redis db num
|
||||
@@ -67,3 +67,18 @@ mongodb_config = {
|
||||
"password": MONGODB_PWD,
|
||||
"db_name": MONGODB_DB_NAME,
|
||||
}
|
||||
|
||||
# postgres config
|
||||
POSTGRES_DB_PWD = os.getenv("POSTGRES_DB_PWD", "123456")
|
||||
POSTGRES_DB_USER = os.getenv("POSTGRES_DB_USER", "postgres")
|
||||
POSTGRES_DB_HOST = os.getenv("POSTGRES_DB_HOST", "localhost")
|
||||
POSTGRES_DB_PORT = os.getenv("POSTGRES_DB_PORT", 5432)
|
||||
POSTGRES_DB_NAME = os.getenv("POSTGRES_DB_NAME", "media_crawler")
|
||||
|
||||
postgres_db_config = {
|
||||
"user": POSTGRES_DB_USER,
|
||||
"password": POSTGRES_DB_PWD,
|
||||
"host": POSTGRES_DB_HOST,
|
||||
"port": POSTGRES_DB_PORT,
|
||||
"db_name": POSTGRES_DB_NAME,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user