aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorBenjamin Bouvier <public@benj.me>2019-07-30 00:48:37 +0200
committerAlexis Metaireau <alexis@notmyidea.org>2019-07-31 13:02:03 +0200
commit9a889f61c7b83834a37bf44fe2d0308fb562f3ba (patch)
tree76c46ee6246df874851059bfab81ece993c3a574 /Dockerfile
parent89e78bb4d0ddccea47d8219129b5e8791fb797a6 (diff)
downloadihatemoney-mirror-9a889f61c7b83834a37bf44fe2d0308fb562f3ba.zip
ihatemoney-mirror-9a889f61c7b83834a37bf44fe2d0308fb562f3ba.tar.gz
ihatemoney-mirror-9a889f61c7b83834a37bf44fe2d0308fb562f3ba.tar.bz2
[docker] Download IHM from Pypy or reference git repo;
This creates two modes to run the Docker image: - either in non-NIGHTLY mode, the latest version will be installed from pypy. - or in Nightly mode, it will clone the repository and update it every time the instance is restarted. It also updates Python to 3.7, for additional goodness.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile29
1 files changed, 12 insertions, 17 deletions
diff --git a/Dockerfile b/Dockerfile
index 8f5e41e..5645a62 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,18 +1,7 @@
-FROM python:3.6-alpine
+FROM python:3.7-alpine
-RUN apk update && apk add gcc libc-dev libffi-dev openssl-dev &&\
- mkdir /ihatemoney &&\
- mkdir -p /etc/ihatemoney &&\
- pip install --no-cache-dir gunicorn pymysql
-
-COPY . /ihatemoney
-ARG INSTALL_FROM_PYPI="False"
-RUN if [ "$INSTALL_FROM_PYPI" = True ]; then\
- pip install --no-cache-dir ihatemoney ; else\
- pip install --no-cache-dir -e /ihatemoney ; \
- fi
-
-ENV DEBUG="False" \
+ENV NIGHTLY="" \
+ DEBUG="False" \
SQLALCHEMY_DATABASE_URI="sqlite:////database/ihatemoney.db" \
SQLALCHEMY_TRACK_MODIFICATIONS="False" \
SECRET_KEY="tralala" \
@@ -21,13 +10,19 @@ ENV DEBUG="False" \
MAIL_PORT=25 \
MAIL_USE_TLS=False \
MAIL_USE_SSL=False \
- MAIL_USERNAME=None \
- MAIL_PASSWORD=None \
+ MAIL_USERNAME= \
+ MAIL_PASSWORD= \
ACTIVATE_DEMO_PROJECT="True" \
ADMIN_PASSWORD="" \
ALLOW_PUBLIC_PROJECT_CREATION="True" \
ACTIVATE_ADMIN_DASHBOARD="False"
+RUN apk update && apk add git gcc libc-dev libffi-dev openssl-dev wget &&\
+ mkdir -p /etc/ihatemoney &&\
+ pip install --no-cache-dir gunicorn pymysql;
+
+COPY ./conf/entrypoint.sh /entrypoint.sh
+
VOLUME /database
EXPOSE 8000
-ENTRYPOINT ["/ihatemoney/conf/confandrun.sh"]
+ENTRYPOINT ["/entrypoint.sh"]