-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.dev
31 lines (22 loc) · 1.02 KB
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.13.1-slim
# Set the working directory to /code.
WORKDIR /code
# Copy the current directory to the /code directory.
COPY . /code
# Install gcc and other dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Poetry
RUN pip install --no-cache-dir poetry
# Use Poetry to install dependencies
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi --no-root --with dev,lint,test
# Make port 8081 available to the world outside this container
EXPOSE 8081
# Healthcheck
HEALTHCHECK --interval=5s --timeout=5s --retries=3 \
CMD curl -f http://localhost:8081/health || exit 1
# Run the uvicorn command, telling it to use the app object imported from app.main.
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8081", "--reload", "--reload-exclude", "tests/*.py"]
# CMD ["uvicorn", "app.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "8081" "--reload", "--reload-exclude", "tests/*.py"]