Dockerize the App!

This commit is contained in:
Patrick Jentsch
2019-09-05 16:39:50 +02:00
parent b34b46ae5d
commit 1044674074
9 changed files with 37 additions and 27 deletions

View File

@ -1,7 +1,9 @@
FROM python:3.6-alpine
RUN apk add build-base
RUN apk add \
build-base \
postgresql-dev
RUN adduser -D opaque
@ -13,10 +15,13 @@ WORKDIR /home/opaque
COPY app app
COPY migrations migrations
COPY opaque.py config.py ./
COPY config.py opaque.py ./
COPY requirements.txt requirements.txt
ENV FLASK_APP=opaque.py
RUN python -m venv venv && \
venv/bin/pip install -r requirements.txt