diff --git a/Dockerfile b/Dockerfile index 64a30753..9e88bb90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN npm run build FROM python:3.11-slim-bookworm as base ENV ENV=prod +ENV PORT "" ENV OLLAMA_API_BASE_URL "/ollama/api" diff --git a/backend/dev.sh b/backend/dev.sh index 9d0b5fa4..c66ae4ba 100644 --- a/backend/dev.sh +++ b/backend/dev.sh @@ -1 +1,2 @@ -uvicorn main:app --port 8080 --host 0.0.0.0 --forwarded-allow-ips '*' --reload \ No newline at end of file +PORT="${PORT:-8080}" +uvicorn main:app --port $PORT --host 0.0.0.0 --forwarded-allow-ips '*' --reload \ No newline at end of file diff --git a/backend/start.sh b/backend/start.sh index ba68207e..44e0c581 100755 --- a/backend/start.sh +++ b/backend/start.sh @@ -1,3 +1,4 @@ #!/usr/bin/env bash -uvicorn main:app --host 0.0.0.0 --port 8080 --forwarded-allow-ips '*' +PORT="${PORT:-8080}" +uvicorn main:app --host 0.0.0.0 --port $PORT --forwarded-allow-ips '*'