-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (18 loc) · 706 Bytes
/
Dockerfile
File metadata and controls
28 lines (18 loc) · 706 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
FROM python:3.8.0-alpine
RUN apk --no-cache add ca-certificates git bash vim openssl gcc build-base make musl-dev python3-dev libffi-dev openssl-dev
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
WORKDIR /usr/src/app/src
RUN \
mkdir config &&\
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -keyout config/myKey.pem -out config/myCrt.pem -subj "/C=ES/ST=BCN/L=BCN/O=myapp.api/CN=myapp.api.com"
RUN \
python manage.py db init &&\
python manage.py db migrate &&\
python manage.py db upgrade
ENV PYTHONPATH "${PYTHONPATH}:/usr/src/app/src"
EXPOSE 8080
CMD [ "python", "run.py" ]