blob: 4440b9a08042fa49f920604ee410b051b665ed0d [file] [log] [blame]
garciadeblas0ce565b2018-10-29 12:22:28 +01001FROM ubuntu:16.04
Mike Marchetti13d76c82018-09-19 15:00:36 -04002
garciadeblas0ce565b2018-10-29 12:22:28 +01003WORKDIR /usr/share/osm-lightui
Mike Marchetti13d76c82018-09-19 15:00:36 -04004
5RUN apt-get update && apt-get install -y npm git python-pip nginx supervisor
6RUN npm install -g bower
Mike Marchetti89f2f422018-09-26 09:58:55 -04007
8ARG LWUI_VERSION=
garciadeblas0ce565b2018-10-29 12:22:28 +01009RUN git clone https://osm.etsi.org/gerrit/osm/LW-UI /usr/share/osm-lightui && echo LWUI_VERSION
Mike Marchetti13d76c82018-09-19 15:00:36 -040010
11RUN ln -s /usr/bin/nodejs /usr/bin/node
12RUN bower install --allow-root
13
14RUN pip install -r requirements.txt
15RUN pip install uwsgi
16#
17RUN echo "daemon off;" >> /etc/nginx/nginx.conf
garciadeblas0ce565b2018-10-29 12:22:28 +010018RUN cp /usr/share/osm-lightui/nginx-app.conf /etc/nginx/sites-available/default
19RUN cp /usr/share/osm-lightui/supervisor-app.conf /etc/supervisor/conf.d/
Mike Marchetti13d76c82018-09-19 15:00:36 -040020
21# delete the copy of the database inside the container (if exists)
22RUN rm -f db.sqlite3
23
24ENV DJANGO_ENV=prod
25RUN python manage.py makemigrations authosm
26RUN python manage.py migrate
27RUN python manage.py collectstatic --noinput
28
29
30EXPOSE 80
31
32CMD ["supervisord", "-n"]