We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8e10e3 commit 72db5d2Copy full SHA for 72db5d2
Dockerfile
@@ -0,0 +1,23 @@
1
+FROM python:3.11-slim
2
+
3
+# Establish a working folder
4
+WORKDIR /app
5
6
+# Establish dependencies
7
+COPY pyproject.toml poetry.lock ./
8
+RUN python -m pip install poetry && \
9
+ poetry config virtualenvs.create false && \
10
+ poetry install --without dev
11
12
+# Copy source files last because they change the most
13
+COPY wsgi.py .
14
+COPY service ./service
15
16
+# Become non-root user
17
+RUN useradd -m -r service && \
18
+ chown -R service:service /app
19
+USER service
20
21
+# Run the service on port 8080
22
+EXPOSE 8080
23
+CMD ["gunicorn", "wsgi:app", "--bind", "0.0.0.0:8080"]
0 commit comments