summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..dccc366
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,13 @@
+# Stage 1: Build Stage
+FROM python:slim AS build
+COPY requirements.txt .
+RUN python -m venv /opt/venv && . /opt/venv/bin/activate && pip install --no-cache-dir -r requirements.txt
+
+# Stage 2: Run Stage
+FROM python:slim AS run
+COPY --from=build /opt/venv /opt/venv
+WORKDIR /app
+COPY app /app
+ENV PATH="/opt/venv/bin/:$PATH"
+EXPOSE 80
+CMD ["gunicorn", "--bind", "0.0.0.0:80", "app:app"]