blob: 932f31ee92b82a52f006608b4b2f517dad576711 [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
Benjamin Diaza5f4a322019-05-22 12:21:31 -03007RUN apt-get install -y npm git python-pip nginx supervisor libmysqlclient-dev mysql-client
garciadeblasf5c33072018-09-27 18:03:45 +02008RUN 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
garciadeblasf5c33072018-09-27 18:03:45 +020022RUN python manage.py collectstatic --noinput
23
garciadeblasf5c33072018-09-27 18:03:45 +020024EXPOSE 80
25
Benjamin Diaza5f4a322019-05-22 12:21:31 -030026CMD ["/usr/share/osm-lightui/entrypoint.sh"]