mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: remove mongo
This commit is contained in:
parent
573b9a43fc
commit
ac70cb534d
4 changed files with 13 additions and 22 deletions
|
|
@ -46,7 +46,7 @@ class HostingConfig(BaseModel):
|
|||
|
||||
|
||||
class DatabaseConfig(BaseModel):
|
||||
mongodb_connection_string: Optional[str]
|
||||
sql_connection_string: Optional[str]
|
||||
|
||||
|
||||
class LearnHouseConfig(BaseModel):
|
||||
|
|
@ -105,8 +105,8 @@ def get_learnhouse_config() -> LearnHouseConfig:
|
|||
env_allowed_origins = env_allowed_origins.split(",")
|
||||
env_allowed_regexp = os.environ.get("LEARNHOUSE_ALLOWED_REGEXP")
|
||||
env_self_hosted = os.environ.get("LEARNHOUSE_SELF_HOSTED")
|
||||
env_mongodb_connection_string = os.environ.get(
|
||||
"LEARNHOUSE_MONGODB_CONNECTION_STRING"
|
||||
env_sql_connection_string = os.environ.get(
|
||||
"LEARNHOUSE_SQL_CONNECTION_STRING"
|
||||
)
|
||||
|
||||
# Sentry Config
|
||||
|
|
@ -166,9 +166,9 @@ def get_learnhouse_config() -> LearnHouseConfig:
|
|||
)
|
||||
|
||||
# Database config
|
||||
mongodb_connection_string = env_mongodb_connection_string or yaml_config.get(
|
||||
sql_connection_string = env_sql_connection_string or yaml_config.get(
|
||||
"database_config", {}
|
||||
).get("mongodb_connection_string")
|
||||
).get("sql_connection_string")
|
||||
|
||||
# Sentry config
|
||||
# check if the sentry config is provided in the YAML file
|
||||
|
|
@ -210,7 +210,7 @@ def get_learnhouse_config() -> LearnHouseConfig:
|
|||
content_delivery=content_delivery,
|
||||
)
|
||||
database_config = DatabaseConfig(
|
||||
mongodb_connection_string=mongodb_connection_string
|
||||
sql_connection_string=sql_connection_string
|
||||
)
|
||||
|
||||
# Create LearnHouseConfig object
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ hosting_config:
|
|||
domain: learnhouse.app
|
||||
ssl: true
|
||||
allowed_origins:
|
||||
- http://localhost:3000
|
||||
- http://localhost:3001
|
||||
- http://localhost:3000
|
||||
- http://localhost:3001
|
||||
cookies_config:
|
||||
domain: ".localhost"
|
||||
allowed_regexp: '\b((?:https?://)[^\s/$.?#].[^\s]*)\b'
|
||||
|
|
@ -25,4 +25,4 @@ hosting_config:
|
|||
endpoint_url: ""
|
||||
|
||||
database_config:
|
||||
mongodb_connection_string: mongodb://learnhouse:learnhouse@mongo:27017/
|
||||
sql_connection_string: postgresql://learnhouse:learnhouse@db:5432/learnhouse
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue