En cours - Travail sur un conteneur afin de lancer l'application avec UWSGI

This commit is contained in:
2017-08-22 23:15:30 +02:00
parent 242b0edff0
commit 46f9fea2c2
2 changed files with 31 additions and 1 deletions

30
Dockerfile Normal file
View File

@ -0,0 +1,30 @@
FROM alpine:3.6
ENV APPS_DIR /opt/apps
ENV DB_DIR $APPS_DIR/db
ENV STATIC_ROOT $APPS_DIR/static
COPY requirements.txt $APPS_DIR/
WORKDIR $APPS_DIR
RUN set -ex \
&& buildDeps=' \
build-base \
python3-dev \
' \
&& apk --no-cache --update add \
mailcap \
python3 \
$buildDeps \
&& pip3 install --no-cache-dir --upgrade pip \
&& pip3 install --no-cache-dir --upgrade -r requirements.txt \
&& apk del $buildDeps \
&& rm -rf /var/cache/apk/*
COPY ./collection $APPS_DIR
VOLUME $DB_DIR
EXPOSE 8000
CMD ["/bin/sh"]