improved dockerfiles and developer setup

This commit is contained in:
Yannic Kilcher
2022-12-17 22:15:01 +01:00
parent edf123e451
commit b45a974287
37 changed files with 78 additions and 55 deletions
@@ -0,0 +1,5 @@
# 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`.
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
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
# switch to backend directory
pushd "$parent_path/../../app"
export ALLOW_ANY_API_KEY=True
uvicorn main:app --reload --port 8080 --host 0.0.0.0
popd