En cours - Travail sur un conteneur afin de lancer l'application avec UWSGI
This commit is contained in:
parent
242b0edff0
commit
46f9fea2c2
30
Dockerfile
Normal file
30
Dockerfile
Normal 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"]
|
@ -78,7 +78,7 @@ WSGI_APPLICATION = 'collection.wsgi.application'
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
'NAME': os.path.join(BASE_DIR, 'db', 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user