2018-02-14 00:38:54 +00:00
|
|
|
FROM python:3.6
|
2016-09-11 23:52:31 +00:00
|
|
|
MAINTAINER Piero Toffanin <pt@masseranolabs.com>
|
|
|
|
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
ENV PYTHONPATH $PYTHONPATH:/webodm
|
|
|
|
|
|
|
|
# Prepare directory
|
|
|
|
RUN mkdir /webodm
|
|
|
|
WORKDIR /webodm
|
|
|
|
|
2018-02-14 00:38:54 +00:00
|
|
|
RUN curl --silent --location https://deb.nodesource.com/setup_8.x | bash -
|
2017-11-17 19:03:24 +00:00
|
|
|
RUN apt-get -qq install -y nodejs
|
2016-12-12 22:35:03 +00:00
|
|
|
|
|
|
|
# Configure use of testing branch of Debian
|
|
|
|
RUN printf "Package: *\nPin: release a=stable\nPin-Priority: 900\n" > /etc/apt/preferences.d/stable.pref
|
|
|
|
RUN printf "Package: *\nPin: release a=testing\nPin-Priority: 750\n" > /etc/apt/preferences.d/testing.pref
|
|
|
|
RUN printf "deb http://mirror.steadfast.net/debian/ stable main contrib non-free\ndeb-src http://mirror.steadfast.net/debian/ stable main contrib non-free" > /etc/apt/sources.list.d/stable.list
|
|
|
|
RUN printf "deb http://mirror.steadfast.net/debian/ testing main contrib non-free\ndeb-src http://mirror.steadfast.net/debian/ testing main contrib non-free" > /etc/apt/sources.list.d/testing.list
|
|
|
|
|
2018-02-16 15:45:53 +00:00
|
|
|
# Install Node.js GDAL, nginx, letsencrypt, psql
|
2019-01-15 17:51:04 +00:00
|
|
|
RUN apt-get -qq update && apt-get -qq install -t testing -y binutils libproj-dev gdal-bin nginx grass-core certbot && apt-get -qq install -y gettext-base cron postgresql-client-9.6
|
2018-02-16 15:45:53 +00:00
|
|
|
|
2017-11-17 18:42:34 +00:00
|
|
|
# Install pip reqs
|
|
|
|
ADD requirements.txt /webodm/
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
ADD . /webodm/
|
|
|
|
|
|
|
|
# Setup cron
|
2019-01-02 21:21:46 +00:00
|
|
|
RUN ln -s /webodm/nginx/crontab /var/spool/cron/crontabs/root && chmod 0644 /webodm/nginx/crontab && service cron start && chmod +x /webodm/nginx/letsencrypt-autogen.sh
|
2017-11-17 18:42:34 +00:00
|
|
|
|
|
|
|
RUN git submodule update --init
|
2016-09-27 14:45:09 +00:00
|
|
|
|
2018-12-04 15:02:13 +00:00
|
|
|
WORKDIR /webodm/nodeodm/external/NodeODM
|
2018-02-16 15:45:53 +00:00
|
|
|
RUN npm install --quiet
|
2016-09-27 14:45:09 +00:00
|
|
|
|
|
|
|
WORKDIR /webodm
|
2018-07-26 19:14:48 +00:00
|
|
|
RUN npm install --quiet -g webpack && npm install --quiet -g webpack-cli && npm install --quiet && webpack --mode production
|
2017-06-15 21:37:44 +00:00
|
|
|
RUN python manage.py collectstatic --noinput
|
2019-03-19 21:58:04 +00:00
|
|
|
RUN bash app/scripts/plugin_cleanup.sh && echo "from app.plugins import build_plugins;build_plugins()" | python manage.py shell
|
2017-03-08 17:16:02 +00:00
|
|
|
|
2017-07-12 13:16:52 +00:00
|
|
|
RUN rm /webodm/webodm/secret_key.py
|
|
|
|
|
2017-03-08 17:16:02 +00:00
|
|
|
VOLUME /webodm/app/media
|