-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (32 loc) · 768 Bytes
/
Dockerfile
File metadata and controls
39 lines (32 loc) · 768 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
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM python:3.8.8-alpine3.13
WORKDIR /srv
# Install system dependencies for poetry
RUN apk add --update --no-cache \
gcc \
libc-dev \
libffi-dev \
openssl-dev \
bash \
git \
libtool \
m4 \
g++ \
autoconf \
automake \
build-base \
postgresql-dev
# cryptography module incompatibility with PEP517
# https://github.com/pyca/cryptography/issues/5771
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
# Install poetry
RUN pip install --upgrade pip
RUN pip install poetry
# Install Python dependencies
ADD pyproject.toml poetry.lock ./
RUN poetry install
# Add the project
# NOTE Run the install again to install the project
ADD src ./src
RUN poetry install
# Set the default command
CMD ["poetry", "run", "python", "src/manage.py", "runserver", "0:8080"]