Skip to content
Snippets Groups Projects
Commit 2f0f53f2 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

docker: convert containers to use Python 3

parent c877bcfc
No related branches found
No related tags found
No related merge requests found
FROM ligo/base:stretch
LABEL name="LIGO GraceDB Django application" \
maintainer="tanner.prestegard@ligo.org" \
date="20190430"
date="20190920"
ARG SETTINGS_MODULE="config.settings.container.dev"
COPY docker/SWITCHaai-swdistrib.gpg /etc/apt/trusted.gpg.d
......@@ -24,11 +24,10 @@ RUN apt-get update && \
mariadb-client \
nodejs \
osg-ca-certs \
python2.7 \
python2.7-dev \
python-libxml2 \
python-pip \
python-voeventlib \
python3.5 \
python3.5-dev \
python3-libxml2 \
python3-pip \
procps \
shibboleth \
supervisor \
......@@ -61,11 +60,12 @@ ADD . /app/gracedb_project
# install gracedb application itself
WORKDIR /app/gracedb_project
RUN bower install --allow-root
RUN pip install --upgrade setuptools wheel && \
pip install -r requirements.txt
RUN pip3 install --upgrade pip
RUN pip3 install --upgrade setuptools wheel && \
pip3 install -r requirements.txt
# Give pip-installed packages priority over distribution packages
ENV PYTHONPATH /usr/local/lib/python2.7/dist-packages:$PYTHONPATH
ENV PYTHONPATH /usr/local/lib/python3.5/dist-packages:$PYTHONPATH
ENV ENABLE_SHIBD false
ENV ENABLE_OVERSEER true
ENV VIRTUAL_ENV dummy
......@@ -97,7 +97,7 @@ RUN DJANGO_SETTINGS_MODULE=${SETTINGS_MODULE} \
DJANGO_TWILIO_AUTH_TOKEN=fake_token \
AWS_SES_ACCESS_KEY_ID=fake_aws_id \
AWS_SES_SECRET_ACCESS_KEY=fake_aws_key \
python manage.py collectstatic --noinput
python3 manage.py collectstatic --noinput
RUN rm -rf /app/logs/* /app/project_data/*
......
#!/usr/bin/python
#!/usr/bin/python3
'''
Pulls Shibboleth status.sso page, checks for:
......
#!/bin/sh
python /app/gracedb_project/manage.py update_user_accounts_from_ligo_ldap people
python /app/gracedb_project/manage.py remove_inactive_alerts
python /app/gracedb_project/manage.py clearsessions
python3 /app/gracedb_project/manage.py update_user_accounts_from_ligo_ldap people
python3 /app/gracedb_project/manage.py remove_inactive_alerts
python3 /app/gracedb_project/manage.py clearsessions
#!/bin/bash
export LVALERT_OVERSEER_RESOURCE=${LVALERT_USER}_overseer_$(python -c 'import uuid; print(uuid.uuid4().hex)')
export LVALERT_OVERSEER_RESOURCE=${LVALERT_USER}_overseer_$(python3 -c 'import uuid; print(uuid.uuid4().hex)')
exec "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment