forked from sapiosciences/sapiocon-23-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (17 loc) · 741 Bytes
/
Dockerfile
File metadata and controls
26 lines (17 loc) · 741 Bytes
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
FROM python:3.10-slim
RUN python -m pip install --upgrade pip
# Create a non-privileged user for extra security. Install the requirements. Create an /app/ directory.
RUN useradd sapio -u 1000 -s /bin/sh && mkdir -p /app
ADD requirements.txt .
RUN pip install -r requirements.txt
ADD . /app/
USER sapio
WORKDIR /app
# This is specific to waitress. Not gunicorn. If this is set to True the server hot-reload your code when it changes.
ENV SapioWebhooksDebug=False
# When set to True, the server will not verify the SSL certificate of the webhook server. This is useful for doing local development.
ENV SapioWebhooksInsecure=False
# Open 8080 and run the server.
EXPOSE 8080
# ENTRYPOINT python server.py
ENTRYPOINT gunicorn server:app