From 4dfec6ed70712e6935d97e74c993afff0d7e7ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6pf?= Date: Tue, 13 Dec 2022 12:02:49 +0100 Subject: [PATCH] mini config infos --- backend/.gitignore | 1 - backend/README.md | 18 ++++++++++++++++++ backend/alembic.ini | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 backend/README.md diff --git a/backend/.gitignore b/backend/.gitignore index aa177967..098a83e4 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -1,4 +1,3 @@ __pycache__ .env notes.txt -db/ diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 00000000..e35fb467 --- /dev/null +++ b/backend/README.md @@ -0,0 +1,18 @@ +# Open-Chat-GPT REST Backend + +## Almbeic database init + +Please edit `alembic.ini` and specify your database uri in the parameter `sqlalchemy.url`. + + +## REST Server Configuration + +Please either use environment variables or create a `.env` file in the backend root directory (in which this readme file is located) to specify the `DATABASE_URI`. + +Example contents of a `.env` file for the backend: + +``` +DATABASE_URI="postgresql://:@/" +BACKEND_CORS_ORIGINS=["http://localhost", "http://localhost:4200", "http://localhost:3000", "http://localhost:8080", "https://localhost", "https://localhost:4200", "https://localhost:3000", "https://localhost:8080", "http://dev.ocgpt.laion.ai", "https://stag.ocgpt.laion.ai", "https://ocgpt.laion.ai"] + +``` \ No newline at end of file diff --git a/backend/alembic.ini b/backend/alembic.ini index 3c75af00..c62e3c84 100644 --- a/backend/alembic.ini +++ b/backend/alembic.ini @@ -55,7 +55,7 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne # are written from script.py.mako # output_encoding = utf-8 -sqlalchemy.url = postgresql://ocgpt_backend_admin:829b5fc358842652fbdd04d0e6f012f2ff4227684f6b24a073b0ec78666e9d5a@localhost/ocgpt_backend +sqlalchemy.url = postgresql://:@/ [post_write_hooks]