mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-09-12 12:03:06 +08:00
local database setup
This commit is contained in:
+10
-1
@@ -2,7 +2,9 @@
|
||||
|
||||
## Alembic database init
|
||||
|
||||
Please edit `alembic.ini` and specify your database URI in the parameter `sqlalchemy.url = postgresql://<username>:<password>@<host>/<database_name>`.
|
||||
~~Please edit `alembic.ini` and specify your database URI in the parameter `sqlalchemy.url = postgresql://<username>:<password>@<host>/<database_name>`.~~
|
||||
|
||||
set the DATABASE_URI environment variable to the database URI, alembic will upgrade automatically on startup.
|
||||
|
||||
## REST Server Configuration
|
||||
|
||||
@@ -15,3 +17,10 @@ DATABASE_URI="postgresql://<username>:<password>@<host>/<database_name>"
|
||||
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"]
|
||||
|
||||
```
|
||||
|
||||
## Running the REST Server locally for development
|
||||
|
||||
Run two terminals (note the working directory for each):
|
||||
|
||||
- Terminal 1, to go `backend/scripts` and run `docker-compose up`. This will start postgres.
|
||||
- Terminal 2, to go `backend` and run `scripts/run-local.sh`. This will start the REST server.
|
||||
|
||||
Reference in New Issue
Block a user