From fe06a77ac0f49322c248d775e055d94e46081f81 Mon Sep 17 00:00:00 2001 From: rajanjha9235 Date: Mon, 3 Jun 2024 09:26:02 -0400 Subject: [PATCH] Added Docker Support --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b6461f8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.9-slim + +# Create working folder and install dependencies +WORKDIR /app +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +# Copy the application contents +COPY service/ ./service/ + +# Switch to a non-root user +RUN useradd --uid 1000 theia && chown -R theia /app +USER theia + +# Run the service +EXPOSE 8080 +CMD ["gunicorn", "--bind=0.0.0.0:8080", "--log-level=info", "service:app"] \ No newline at end of file