2020-10-21 14:07:35 +00:00
|
|
|
FROM ubuntu:18.04
|
2016-09-11 23:52:31 +00:00
|
|
|
MAINTAINER Piero Toffanin <pt@masseranolabs.com>
|
|
|
|
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
ENV PYTHONPATH $PYTHONPATH:/webodm
|
2019-12-09 22:11:57 +00:00
|
|
|
ENV PROJ_LIB=/usr/share/proj
|
2016-09-11 23:52:31 +00:00
|
|
|
|
|
|
|
# Prepare directory
|
|
|
|
RUN mkdir /webodm
|
|
|
|
WORKDIR /webodm
|
|
|
|
|
2020-10-21 14:07:35 +00:00
|
|
|
RUN apt-get -qq update && apt-get install -y software-properties-common tzdata
|
|
|
|
RUN add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
|
|
|
|
|
2020-07-27 15:45:31 +00:00
|
|
|
# Install Node.js
|
2020-09-25 15:39:46 +00:00
|
|
|
RUN apt-get -qq update && apt-get -qq install -y --no-install-recommends wget curl
|
2020-07-26 16:24:01 +00:00
|
|
|
RUN wget --no-check-certificate https://deb.nodesource.com/setup_12.x -O /tmp/node.sh && bash /tmp/node.sh
|
|
|
|
RUN apt-get -qq update && apt-get -qq install -y nodejs
|
2016-12-12 22:35:03 +00:00
|
|
|
|
2020-07-27 15:45:31 +00:00
|
|
|
# Install Python3, GDAL, nginx, letsencrypt, psql
|
2020-12-14 17:43:16 +00:00
|
|
|
RUN apt-get -qq update && apt-get -qq install -y --no-install-recommends python3 python3-pip python3-setuptools python3-wheel git g++ python3-dev libpq-dev binutils libproj-dev gdal-bin python3-gdal nginx certbot grass-core gettext-base cron postgresql-client-10 gettext
|
2020-10-21 14:07:35 +00:00
|
|
|
RUN update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 && update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
|
|
|
|
RUN ln -s /usr/bin/pip3 /usr/bin/pip && pip install -U pip
|
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
|
|
|
|
2020-12-23 01:11:59 +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
|
2020-12-28 16:22:50 +00:00
|
|
|
RUN npm install --quiet -g webpack@4.16.5 && npm install --quiet -g webpack-cli@4.2.0 && npm install --quiet && webpack --mode production
|
2020-10-21 14:07:35 +00:00
|
|
|
RUN echo "UTC" > /etc/timezone
|
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
|
2020-12-22 20:39:37 +00:00
|
|
|
RUN bash translate.sh build safe
|
2017-03-08 17:16:02 +00:00
|
|
|
|
2020-07-26 16:24:01 +00:00
|
|
|
# Cleanup
|
|
|
|
RUN apt-get remove -y g++ python3-dev libpq-dev && apt-get autoremove -y
|
|
|
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
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
|