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