mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-30 16:40:05 +08:00
changed scripts location
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Backend Development Setup
|
||||
|
||||
Run `docker compose up` to start a database. The default settings are already configured to connect to the database at `localhost:5432`.
|
||||
|
||||
Make sure you have all requirements installed. You can do this by running `pip install -r requirements.txt` inside the `backend` folder.
|
||||
Then, run the backend using the `run-local.sh` script. This will start the backend server at `http://localhost:8080`.
|
||||
@@ -0,0 +1,17 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres
|
||||
restart: always
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
restart: always
|
||||
ports:
|
||||
- 8089:8080
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
||||
|
||||
# switch to backend directory
|
||||
pushd "$parent_path/../../backend/app"
|
||||
|
||||
export ALLOW_ANY_API_KEY=True
|
||||
|
||||
uvicorn main:app --reload --port 8080 --host 0.0.0.0
|
||||
|
||||
popd
|
||||
@@ -0,0 +1,5 @@
|
||||
# Frontend Development Setup
|
||||
|
||||
Run `docker compose up --build` to start a database and the backend server.
|
||||
|
||||
Then, point your frontend at `http://localhost:8080` to start developing. During development, any API key will be accepted.
|
||||
@@ -0,0 +1,26 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
db:
|
||||
extends:
|
||||
file: ../backend-development/docker-compose.yaml
|
||||
service: db
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "postgres"]
|
||||
interval: 2s
|
||||
timeout: 2s
|
||||
retries: 10
|
||||
adminer:
|
||||
extends:
|
||||
file: ../backend-development/docker-compose.yaml
|
||||
service: adminer
|
||||
backend:
|
||||
build: ../../backend/.
|
||||
environment:
|
||||
- POSTGRES_HOST=db
|
||||
- ALLOW_ANY_API_KEY=True
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8080:8080"
|
||||
Reference in New Issue
Block a user