forked from ministryofjustice/money-to-prisoners-send-money
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (31 loc) · 822 Bytes
/
Dockerfile
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
FROM base-web
# pre-create directories
RUN set -ex; mkdir -p \
mtp_send_money/assets \
mtp_send_money/assets-static \
static \
media \
spooler \
reports
# cache python packages, unless requirements change
COPY ./requirements requirements
RUN venv/bin/pip install -r requirements/base.txt
# add app and build it
COPY . /app
RUN set -ex; \
venv/bin/python run.py --requirements-file requirements/base.txt build \
&& \
chown -R mtp:mtp /app
USER 1000
ARG APP_GIT_COMMIT
ARG APP_GIT_BRANCH
ARG APP_BUILD_TAG
ARG APP_BUILD_DATE
ENV APP_GIT_COMMIT ${APP_GIT_COMMIT}
ENV APP_GIT_BRANCH ${APP_GIT_BRANCH}
ENV APP_BUILD_TAG ${APP_BUILD_TAG}
ENV APP_BUILD_DATE ${APP_BUILD_DATE}
# run uwsgi on 8080
EXPOSE 8080
ENV DJANGO_SETTINGS_MODULE=mtp_send_money.settings.docker
CMD venv/bin/uwsgi --ini send_money.ini