4440b9a08042fa49f920604ee410b051b665ed0d
[osm/devops.git] / docker / light-ui / Dockerfile
1 FROM ubuntu:16.04
2
3 WORKDIR /usr/share/osm-lightui
4
5 RUN apt-get update && apt-get install -y npm git python-pip nginx supervisor
6 RUN npm install -g bower
7
8 ARG LWUI_VERSION=
9 RUN git clone https://osm.etsi.org/gerrit/osm/LW-UI /usr/share/osm-lightui && echo LWUI_VERSION
10
11 RUN ln -s /usr/bin/nodejs /usr/bin/node
12 RUN bower install --allow-root
13
14 RUN pip install -r requirements.txt
15 RUN pip install uwsgi
16 #
17 RUN echo "daemon off;" >> /etc/nginx/nginx.conf
18 RUN cp /usr/share/osm-lightui/nginx-app.conf /etc/nginx/sites-available/default
19 RUN cp /usr/share/osm-lightui/supervisor-app.conf /etc/supervisor/conf.d/
20
21 # delete the copy of the database inside the container (if exists)
22 RUN rm -f db.sqlite3
23
24 ENV DJANGO_ENV=prod
25 RUN python manage.py makemigrations authosm
26 RUN python manage.py migrate
27 RUN python manage.py collectstatic --noinput
28
29
30 EXPOSE 80
31
32 CMD ["supervisord", "-n"]