blob: 5c0aec0cca3563809b686fc08a42772ca62f1958 [file] [log] [blame]
garciadeblasa70bcf92018-10-29 12:25:24 +01001FROM ubuntu:16.04
garciadeblasf5c33072018-09-27 18:03:45 +02002
3WORKDIR /usr/share/osm-lightui
4COPY . /usr/share/osm-lightui
5
6RUN apt-get update
7RUN apt-get install -y npm git python-pip nginx supervisor
8RUN npm install -g bower
9RUN ln -s /usr/bin/nodejs /usr/bin/node
10RUN bower install --allow-root
11RUN pip install -r requirements.txt
12RUN pip install uwsgi
13
14RUN echo "daemon off;" >> /etc/nginx/nginx.conf
15COPY nginx-app.conf /etc/nginx/sites-available/default
16COPY supervisor-app.conf /etc/supervisor/conf.d/
17
18# delete the copy of the database inside the container (if exists)
19RUN rm -f db.sqlite3
20
21ENV DJANGO_ENV=prod
22RUN python manage.py makemigrations authosm
23RUN python manage.py migrate
24RUN python manage.py collectstatic --noinput
25
26
27EXPOSE 80
28
29CMD ["supervisord", "-n"]