blob: 1e54567ac618191c8b38d04902c4a85f6fcdc062 [file] [log] [blame]
garciadeblas0ce565b2018-10-29 12:22:28 +01001FROM ubuntu:16.04
Mike Marchetti13d76c82018-09-19 15:00:36 -04002
garciadeblas3fad2ea2018-11-29 16:36:50 +01003RUN apt-get update && apt-get install -y npm git python-pip nginx supervisor curl software-properties-common
garciadeblas28f76d92018-11-28 14:15:04 +01004RUN npm install -g bower
garciadeblas28f76d92018-11-28 14:15:04 +01005RUN ln -s /usr/bin/nodejs /usr/bin/node
garciadeblas3fad2ea2018-11-29 16:36:50 +01006RUN echo "daemon off;" >> /etc/nginx/nginx.conf
garciadeblas28f76d92018-11-28 14:15:04 +01007
garciadeblas3fad2ea2018-11-29 16:36:50 +01008ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
9ARG RELEASE=ReleaseFOUR-daily
10ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
11ARG REPOSITORY=testing
12ARG LWUI_VERSION
13
14RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
15RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} LW-UI" && apt-get update
16
17RUN apt-get install -y osm-lightui${LWUI_VERSION} && \
18 rm -rf /var/lib/apt/lists/*
19
20WORKDIR /usr/share/osm-lightui
21RUN bower install --allow-root
Mike Marchetti13d76c82018-09-19 15:00:36 -040022RUN pip install -r requirements.txt
23RUN pip install uwsgi
garciadeblas0ce565b2018-10-29 12:22:28 +010024RUN cp /usr/share/osm-lightui/nginx-app.conf /etc/nginx/sites-available/default
25RUN cp /usr/share/osm-lightui/supervisor-app.conf /etc/supervisor/conf.d/
Mike Marchetti13d76c82018-09-19 15:00:36 -040026
27# delete the copy of the database inside the container (if exists)
28RUN rm -f db.sqlite3
29
30ENV DJANGO_ENV=prod
31RUN python manage.py makemigrations authosm
32RUN python manage.py migrate
33RUN python manage.py collectstatic --noinput
34
35
36EXPOSE 80
37
38CMD ["supervisord", "-n"]