blob: 4440b9a08042fa49f920604ee410b051b665ed0d [file] [log] [blame]
garciadeblas0ce565b2018-10-29 12:22:28 +01001FROM ubuntu:16.04
Mike Marchetti13d76c82018-09-19 15:00:36 -04002
garciadeblasd3a95412018-11-20 18:29:12 +01003WORKDIR /usr/share/osm-lightui
garciadeblas28f76d92018-11-28 14:15:04 +01004
5RUN apt-get update && apt-get install -y npm git python-pip nginx supervisor
6RUN npm install -g bower
7
8ARG LWUI_VERSION=
9RUN git clone https://osm.etsi.org/gerrit/osm/LW-UI /usr/share/osm-lightui && echo LWUI_VERSION
10
11RUN ln -s /usr/bin/nodejs /usr/bin/node
garciadeblasd3a95412018-11-20 18:29:12 +010012RUN bower install --allow-root
garciadeblas28f76d92018-11-28 14:15:04 +010013
Mike Marchetti13d76c82018-09-19 15:00:36 -040014RUN pip install -r requirements.txt
15RUN pip install uwsgi
garciadeblas28f76d92018-11-28 14:15:04 +010016#
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"]