Add Default Database Connection Values to Facilitate Docker Setup
Fakamoto opened this issue · 1 comments
Fakamoto commented
I would add default values for the database connection, this would allow the user that is planning to use rag_api by simply running docker-compose up
to have it up and running by only creating a .env with the OPENAI_API_KEY
value.
How to implement:
in config.py line 24 add:
POSTGRES_DB = get_env_variable("POSTGRES_DB", "mydatabase")
POSTGRES_USER = get_env_variable("POSTGRES_USER", "myuser")
POSTGRES_PASSWORD = get_env_variable("POSTGRES_PASSWORD", "mypassword")
DB_HOST = get_env_variable("DB_HOST", "db")
DB_PORT = get_env_variable("DB_PORT", "5432")
danny-avila commented
I would add default values for the database connection, this would allow the user that is planning to use rag_api by simply running
docker-compose up
to have it up and running by only creating a .env with theOPENAI_API_KEY
value.How to implement: in config.py line 24 add:
POSTGRES_DB = get_env_variable("POSTGRES_DB", "mydatabase") POSTGRES_USER = get_env_variable("POSTGRES_USER", "myuser") POSTGRES_PASSWORD = get_env_variable("POSTGRES_PASSWORD", "mypassword") DB_HOST = get_env_variable("DB_HOST", "db") DB_PORT = get_env_variable("DB_PORT", "5432")
Hi! Feel free to submit a PR and I will merge. Thanks!