Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IGWN Computing and Software
GraceDB
GraceDB Server
Commits
01d37e1c
Commit
01d37e1c
authored
6 years ago
by
Thomas Downes
Committed by
GraceDB
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update Dockerfile to match thomas.downes branch
parent
7119da4d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+51
-23
51 additions, 23 deletions
Dockerfile
with
51 additions
and
23 deletions
Dockerfile
+
51
−
23
View file @
01d37e1c
...
@@ -3,45 +3,75 @@ LABEL name="LIGO GraceDB Django application" \
...
@@ -3,45 +3,75 @@ LABEL name="LIGO GraceDB Django application" \
maintainer="tanner.prestegard@ligo.org" \
maintainer="tanner.prestegard@ligo.org" \
date="20181206"
date="20181206"
ARG
SETTINGS_MODULE="config.settings.container.dev"
ARG
SETTINGS_MODULE="config.settings.container.dev"
WORKDIR
/app
ADD
. /app/gracedb_project
# Volumes
COPY
docker/SWITCHaai-swdistrib.gpg /etc/apt/trusted.gpg.d
VOLUME
/app/logs /app/project_data
RUN
echo
'deb http://pkg.switch.ch/switchaai/debian stretch main'
>
/etc/apt/sources.list.d/shibboleth.list
RUN
curl
-sL
https://deb.nodesource.com/setup_8.x | bash -
RUN
apt-get update
# the previous command executes apt-get update; if it is removed
RUN
apt-get
install
--assume-yes
gcc
\
# one must add RUN apt-get update
RUN
apt-get
install
--install-recommends
--assume-yes
\
apache2
\
gcc
\
git
\
git
\
libapache2-mod-xsendfile
\
libmariadbclient-dev
\
libmariadbclient-dev
\
libldap2-dev
\
libldap2-dev
\
libsasl2-dev
\
libsasl2-dev
\
libxml2-dev
\
libxml2-dev
\
libsqlite3-dev
\
libsqlite3-dev
\
mariadb-client
\
mariadb-client
\
nodejs
\
python2.7
\
python2.7
\
python2.7-dev
\
python-glue
\
python-glue
\
python-matplotlib
\
python-pip
\
python-pip
\
python-voeventlib
python-voeventlib
\
procps
\
shibboleth
\
supervisor
\
vim
&&
\
apt-get clean
&&
\
npm
install
-g
bower
# Install npm and bower
COPY
docker/supervisord.conf /etc/supervisor/supervisord.conf
RUN
curl
-sL
https://deb.nodesource.com/setup_8.x | bash -
COPY
docker/supervisord-apache2.conf /etc/supervisor/conf.d/apache2.conf
RUN
apt-get update
&&
\
COPY
docker/shibboleth-ds /etc/shibboleth-ds
apt-get
install
nodejs
&&
\
COPY
docker/apache-config /etc/apache2/sites-available/gracedb.conf
apt-get clean
&&
\
COPY
docker/login.ligo.org.cert.LIGOCA.pem /etc/shibboleth/login.ligo.org.cert.LIGOCA.pem
npm
install
-g
bower
COPY
docker/inc-md-cert.pem /etc/shibboleth/inc-md-cert.pem
RUN
a2dissite 000-default.conf
&&
\
a2ensite gracedb.conf
&&
\
a2enmod headers proxy proxy_http rewrite xsendfile
# Set up bower components
# this line is unfortunate because "." updates for nearly any change to the
# repository and therefore docker build rarely caches the steps below
ADD
. /app/gracedb_project
# install gracedb application itself
WORKDIR
/app/gracedb_project
WORKDIR
/app/gracedb_project
RUN
bower
install
--allow-root
RUN
bower
install
--allow-root
RUN
pip
install
--upgrade
setuptools wheel
&&
\
# Install Python packages
pip
install
-r
requirements.txt
RUN
pip
install
-r
requirements.txt
# Give pip-installed packages priority over distribution packages
# Give pip-installed packages priority over distribution packages
ENV
PYTHONPATH /usr/local/lib/python2.7/dist-packages:$PYTHONPATH
ENV
PYTHONPATH /usr/local/lib/python2.7/dist-packages:$PYTHONPATH
ENV
VIRTUAL_ENV dummy
# Collect static components. Have to set a settings module envvar
# Expose port and run Gunicorn
# and fake a few other required environment variables
EXPOSE
8000
# Volumes
VOLUME
/app/logs /app/project_data
# Generate documentation
WORKDIR
/app/gracedb_project/docs/user_docs
RUN
sphinx-build
-b
html
source
build
WORKDIR
/app/gracedb_project/docs/admin_docs
RUN
sphinx-build
-b
html
source
build
WORKDIR
/app/gracedb_project
RUN
DJANGO_SETTINGS_MODULE
=
${
SETTINGS_MODULE
}
\
RUN
DJANGO_SETTINGS_MODULE
=
${
SETTINGS_MODULE
}
\
DJANGO_DB_NAME
=
fake_name
\
DJANGO_DB_NAME
=
fake_name
\
DJANGO_DB_PASSWORD
=
fake_password
\
DJANGO_DB_PASSWORD
=
fake_password
\
...
@@ -49,6 +79,4 @@ RUN DJANGO_SETTINGS_MODULE=${SETTINGS_MODULE} \
...
@@ -49,6 +79,4 @@ RUN DJANGO_SETTINGS_MODULE=${SETTINGS_MODULE} \
DJANGO_PRIMARY_FQDN
=
fake_fqdn
\
DJANGO_PRIMARY_FQDN
=
fake_fqdn
\
python manage.py collectstatic
--noinput
python manage.py collectstatic
--noinput
# Expose port and run Gunicorn
CMD
["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
EXPOSE
8000
CMD
["gunicorn", "--reload", "--bind", "0.0.0.0:8000", "config.wsgi:application"]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment