blob: b91eed0a44e9bc3618a316941067fb1b82f69d6c [file] [log] [blame]
lombardofr12309022019-07-30 15:37:13 +02001# Copyright 2019 EveryUP
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
garciadeblasa70bcf92018-10-29 12:25:24 +010016FROM ubuntu:16.04
garciadeblasf5c33072018-09-27 18:03:45 +020017
18WORKDIR /usr/share/osm-lightui
19COPY . /usr/share/osm-lightui
20
lombardofr12309022019-07-30 15:37:13 +020021RUN apt-get update && apt-get install -y npm git python-pip nginx supervisor curl software-properties-common libmysqlclient-dev mysql-client
garciadeblasf5c33072018-09-27 18:03:45 +020022RUN ln -s /usr/bin/nodejs /usr/bin/node
lombardofre5a130a2019-07-15 09:17:59 +020023RUN npm install
lombardofr12309022019-07-30 15:37:13 +020024RUN mv node_modules ./static
garciadeblasf5c33072018-09-27 18:03:45 +020025RUN pip install -r requirements.txt
26RUN pip install uwsgi
27
28RUN echo "daemon off;" >> /etc/nginx/nginx.conf
29COPY nginx-app.conf /etc/nginx/sites-available/default
30COPY supervisor-app.conf /etc/supervisor/conf.d/
31
32# delete the copy of the database inside the container (if exists)
33RUN rm -f db.sqlite3
34
35ENV DJANGO_ENV=prod
David Garcia70f96292020-01-08 13:14:46 +010036ENV OSM_SERVER=nbi
37# ENV OSMUI_SQL_DATABASE_URI=mysql://root:secret@mysql:3306/lwui
garciadeblasf5c33072018-09-27 18:03:45 +020038RUN python manage.py collectstatic --noinput
39
garciadeblasf5c33072018-09-27 18:03:45 +020040EXPOSE 80
41
lombardofr12309022019-07-30 15:37:13 +020042CMD ["/usr/share/osm-lightui/entrypoint.sh"]