From 4ae04553df41212a2eb0ebe2b99a6095e754601c Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Sun, 19 Nov 2023 21:39:10 -0500 Subject: [PATCH] simplify dockerfile and update docker-compose to use 7001 --- backend/Dockerfile | 16 +--------------- docker-compose.yml | 4 ++-- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index f3c61cd..c520517 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,17 +1,6 @@ FROM python:3.12-slim-bullseye -#ARG YOUR_ENV # Set your environment variable (prod vs. dev) - -# Set environment variables -ENV PYTHONFAULTHANDLER 1 -ENV PYTHONDONTWRITEBYTECODE 1 -ENV PYTHONUNBUFFERED 1 -ENV PYTHONHASHSEED random -ENV PIP_NO_CACHE_DIR off -ENV PIP_DISABLE_PIP_VERSION_CHECK on -ENV PIP_DEFAULT_TIMEOUT 100 ENV POETRY_VERSION 1.4.1 -#ENV ENVIRONMENT $YOUR_ENV # Install system dependencies RUN pip install "poetry==$POETRY_VERSION" @@ -28,8 +17,5 @@ RUN poetry config virtualenvs.create false # Install dependencies RUN poetry install -# if you have dev dependencies and runnning in production -#poetry install $(test "$YOUR_ENV" == production && echo "--no-dev") --no-interaction --no-ansi - # Copy the current directory contents into the container at /app -COPY ./ /app/ \ No newline at end of file +COPY ./ /app/ diff --git a/docker-compose.yml b/docker-compose.yml index 9a76467..87f0a66 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,9 +15,9 @@ services: # - OPENAI_API_KEY=your_openai_api_key ports: - - "${BACKEND_PORT:-7000}:${BACKEND_PORT:-7000}" + - "${BACKEND_PORT:-7001}:${BACKEND_PORT:-7001}" - command: poetry run uvicorn main:app --host 0.0.0.0 --port ${BACKEND_PORT:-7000} + command: poetry run uvicorn main:app --host 0.0.0.0 --port ${BACKEND_PORT:-7001} frontend: build: