blob: d3bec05f9ad7945e81fd5031e3c939fa5f091395 [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
garciadeblasf5c33072018-09-27 18:03:45 +020036RUN python manage.py collectstatic --noinput
37
garciadeblasf5c33072018-09-27 18:03:45 +020038EXPOSE 80
39
lombardofr12309022019-07-30 15:37:13 +020040CMD ["/usr/share/osm-lightui/entrypoint.sh"]