Skip to content

Commit

Permalink
updated dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Jan 9, 2024
1 parent 3d60f77 commit 55b5134
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Use the official Python 3.12 slim image
FROM python:3.12-slim

# Set the working directory
WORKDIR /code

# Set environment variable to prevent Python from buffering stdout and stderr
ENV PYTHONUNBUFFERED=1

# Add Debian repository for additional packages
RUN echo "deb https://deb.debian.org/debian/ stable main" > /etc/apt/sources.list

COPY requirements.txt /code/app/requirements.txt
# Install necessary system packages
RUN apt-get update \
&& apt-get -y install libpq-dev swig vim gcc libssl-dev

# Copy and install Python dependencies
COPY ./requirements.txt /code/app/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/app/requirements.txt

# Copy the application code
COPY . /code/app

# Set the default command to run the application
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]

0 comments on commit 55b5134

Please sign in to comment.