Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org on the morning of Tuesday 11th August 2020, starting at approximately 9am PDT. It is expected to take around 20 minutes and there will be a short period of downtime (less than five minutes) towards the end of the maintenance window. Please direct any comments, questions, or concerns to computing-help@ligo.org.

Commit 411bde82 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB

Install bower packages and collect static components

parent 941a6d22
FROM ligo/base:stretch
LABEL name="LIGO GraceDB Django application" \
maintainer="tanner.prestegard@ligo.org" \
date="20180215"
date="20181206"
ARG SETTINGS_MODULE="config.settings.container"
WORKDIR /app
ADD . /app/gracedb_project
......@@ -10,33 +11,50 @@ VOLUME /app/logs /app/project_data
RUN apt-get update
RUN apt-get install --assume-yes gcc \
python2.7 \
python-pip \
mariadb-client \
git \
libmariadbclient-dev \
libldap2-dev \
libsasl2-dev \
libxml2-dev \
libsqlite3-dev \
mariadb-client \
python2.7 \
python-glue \
python-pip \
python-voeventlib
# Install npm, bower, bower_components
# Install npm and bower
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get update && \
apt-get install nodejs && \
apt-get clean && \
npm install -g bower
# Set up bower components
WORKDIR /app/gracedb_project
RUN bower install --allow-root
# Install Python packages
RUN pip install -r ./gracedb_project/requirements.txt
EXPOSE 8000
RUN pip install -r requirements.txt
# Give pip-installed packages priority over distribution packages
ENV PYTHONPATH /usr/local/lib/python2.7/dist-packages:$PYTHONPATH
ENV VIRTUAL_ENV dummy
# Set WORKDIR and run Gunicorn
WORKDIR /app/gracedb_project
#RUN python manage.py collectstatic --noinput
# Collect static components. First step: set settings module and
# fake a few other required environment variables
ENV DJANGO_SETTINGS_MODULE ${SETTINGS_MODULE}
ENV DJANGO_DB_PASSWORD fake_password
ENV DJANGO_SECRET_KEY fake_key
ENV DJANGO_PRIMARY_FQDN fake_fqdn
RUN python manage.py collectstatic --noinput
# Unset faked environment variables
RUN unset DJANGO_SETTINGS_MODULE \
DJANGO_DB_PASSWORD \
DJANGO_SECRET_KEY \
DJANGO_PRIMARY_FQDN
# Expose port and run Gunicorn
EXPOSE 8000
CMD ["gunicorn", "--reload", "--bind", "0.0.0.0:8000", "config.wsgi:application"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment