restore backend.dockerfile

This commit is contained in:
Andreas Köpf
2022-12-17 11:27:14 +01:00
parent 668f81c5b2
commit c1ae50d693
4 changed files with 33 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
pushd $parent_path
docker build ../../backend -f ../backend.dockerfile -t ocgpt-backend
popd
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
# This script launches a ocgpt-backend docker container stand-alone.
docker run -it --rm -p 127.0.0.1:8000:80/tcp --env POSTGRES_SERVER=host.docker.internal:5432 --env ALLOW_ANY_API_KEY=True --add-host host.docker.internal:host-gateway ocgpt-backend
+6
View File
@@ -1,5 +1,11 @@
#!/usr/bin/env bash
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
# switch to backend directory
pushd "$parent_path/../"
export ALLOW_ANY_API_KEY=True
uvicorn app.main:app --reload
popd