-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
132 changed files
with
5,447 additions
and
2,821 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
on: | ||
pull_request: | ||
issue_comment: | ||
types: [created, edited] | ||
|
||
name: Wool | ||
|
||
jobs: | ||
runWool: | ||
name: Run black | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- uses: uc-cdis/wool@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
bin/* | ||
dev-requirements.txt | ||
cfg_help.py | ||
fence/* | ||
requirements.txt | ||
run.py | ||
setup.py | ||
wsgi.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
# To run: docker run -d -v /path/to/fence-config.yaml:/var/www/fence/fence-config.yaml --name=fence -p 80:80 fence | ||
# To check running container: docker exec -it fence /bin/bash | ||
|
||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
apache2 \ | ||
build-essential \ | ||
curl \ | ||
git \ | ||
# for ftp | ||
lftp \ | ||
# for decryption dbgap files | ||
mcrypt \ | ||
libapache2-mod-wsgi \ | ||
# dependency for cryptography | ||
libffi-dev \ | ||
# dependency for pyscopg2 - which is dependency for sqlalchemy postgres engine | ||
libpq-dev \ | ||
# dependency for cryptography | ||
libssl-dev \ | ||
# dependency for ssh and sftp | ||
openssh-client \ | ||
python2.7 \ | ||
python-dev \ | ||
python-pip \ | ||
python-setuptools \ | ||
vim \ | ||
&& pip install pip==9.0.3 \ | ||
&& pip install --upgrade setuptools \ | ||
&& mkdir /var/www/fence \ | ||
&& mkdir -p /var/www/.cache/Python-Eggs/ \ | ||
&& chown www-data -R /var/www/.cache/Python-Eggs/ | ||
FROM quay.io/cdis/python-nginx:pybase3-1.2.0 | ||
|
||
ENV appname=fence | ||
|
||
RUN apk update \ | ||
&& apk add postgresql-libs postgresql-dev libffi-dev libressl-dev \ | ||
&& apk add linux-headers musl-dev gcc \ | ||
&& apk add curl bash git vim make | ||
|
||
COPY . /$appname | ||
COPY ./deployment/uwsgi/uwsgi.ini /etc/uwsgi/uwsgi.ini | ||
COPY ./deployment/uwsgi/wsgi.py /$appname/wsgi.py | ||
WORKDIR /$appname | ||
|
||
COPY requirements.txt /fence/requirements.txt | ||
RUN pip install -r /fence/requirements.txt | ||
RUN python -m pip install --upgrade pip \ | ||
&& python -m pip install --upgrade setuptools \ | ||
&& pip install -r requirements.txt | ||
|
||
RUN mkdir -p /var/www/$appname \ | ||
&& mkdir -p /var/www/.cache/Python-Eggs/ \ | ||
&& mkdir /run/nginx/ \ | ||
&& ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log \ | ||
&& chown nginx -R /var/www/.cache/Python-Eggs/ \ | ||
&& chown nginx /var/www/$appname | ||
|
||
COPY . /fence | ||
WORKDIR /fence | ||
COPY deployment/fence.conf /etc/apache2/sites-available/fence.conf | ||
RUN apk update && apk add openssh && apk add libmcrypt-dev | ||
|
||
# | ||
# Custom apache24 logging - see http://www.loadbalancer.org/blog/apache-and-x-forwarded-for-headers/ | ||
# libmhash is required by mcrypt - below - no apk package available | ||
# | ||
RUN ln -s /fence/wsgi.py /var/www/fence/wsgi.py \ | ||
&& COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" >fence/version_data.py \ | ||
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >>fence/version_data.py \ | ||
&& python setup.py develop \ | ||
&& a2dissite 000-default \ | ||
&& a2ensite fence \ | ||
&& a2enmod reqtimeout \ | ||
&& ln -sf /dev/stdout /var/log/apache2/access.log \ | ||
&& ln -sf /dev/stderr /var/log/apache2/error.log | ||
RUN (cd /tmp \ | ||
&& wget -O mhash.tar.gz https://sourceforge.net/projects/mhash/files/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz/download \ | ||
&& tar xvfz mhash.tar.gz \ | ||
&& cd mhash-0.9.9.9 \ | ||
&& ./configure && make && make install \ | ||
&& /bin/rm -rf /tmp/*) | ||
|
||
# | ||
# mcrypt is required to decrypt dbgap user files - see fence/sync/sync_users.py | ||
# | ||
RUN (cd /tmp \ | ||
&& wget -O mcrypt.tar.gz https://sourceforge.net/projects/mcrypt/files/MCrypt/Production/mcrypt-2.6.4.tar.gz/download \ | ||
&& tar xvfz mcrypt.tar.gz \ | ||
&& cd mcrypt-2.6.4 \ | ||
&& ./configure && make && make install \ | ||
&& /bin/rm -rf /tmp/*) | ||
EXPOSE 80 | ||
WORKDIR /var/www/fence/ | ||
|
||
CMD bash /fence/dockerrun.bash | ||
RUN COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" >$appname/version_data.py \ | ||
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >>$appname/version_data.py \ | ||
&& python setup.py develop | ||
|
||
WORKDIR /var/www/$appname | ||
|
||
CMD ["sh","-c","bash /fence/dockerrun.bash && /dockerrun.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!groovy | ||
|
||
@Library('cdis-jenkins-lib@master') _ | ||
|
||
securityPipeline { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.