blob: 9723b8e93cfc69c6cbff53f87a132c8fa4c1eb2f [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
lombardofre5a130a2019-07-15 09:17:59 +020010#RUN bower install --allow-root
11RUN npm install
12RUN mv node_modules /static
garciadeblasf5c33072018-09-27 18:03:45 +020013RUN pip install -r requirements.txt
14RUN pip install uwsgi
15
16RUN echo "daemon off;" >> /etc/nginx/nginx.conf
17COPY nginx-app.conf /etc/nginx/sites-available/default
18COPY supervisor-app.conf /etc/supervisor/conf.d/
19
20# delete the copy of the database inside the container (if exists)
21RUN rm -f db.sqlite3
22
23ENV DJANGO_ENV=prod
garciadeblasf5c33072018-09-27 18:03:45 +020024RUN python manage.py collectstatic --noinput
25
garciadeblasf5c33072018-09-27 18:03:45 +020026EXPOSE 80
27
Benjamin Diaza5f4a322019-05-22 12:21:31 -030028CMD ["/usr/share/osm-lightui/entrypoint.sh"]