simplify dockerfile and update docker-compose to use 7001
This commit is contained in:
parent
fdd3880162
commit
4ae04553df
@ -1,17 +1,6 @@
|
|||||||
FROM python:3.12-slim-bullseye
|
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 POETRY_VERSION 1.4.1
|
||||||
#ENV ENVIRONMENT $YOUR_ENV
|
|
||||||
|
|
||||||
# Install system dependencies
|
# Install system dependencies
|
||||||
RUN pip install "poetry==$POETRY_VERSION"
|
RUN pip install "poetry==$POETRY_VERSION"
|
||||||
@ -28,8 +17,5 @@ RUN poetry config virtualenvs.create false
|
|||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN poetry install
|
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 the current directory contents into the container at /app
|
||||||
COPY ./ /app/
|
COPY ./ /app/
|
||||||
|
|||||||
@ -15,9 +15,9 @@ services:
|
|||||||
# - OPENAI_API_KEY=your_openai_api_key
|
# - OPENAI_API_KEY=your_openai_api_key
|
||||||
|
|
||||||
ports:
|
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:
|
frontend:
|
||||||
build:
|
build:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user