Skip to content

Commit

Permalink
Make default dockerfile ship with compliance
Browse files Browse the repository at this point in the history
Add space
Change back to port 80
Set example data
Move compliance data up a directory to avoid collisions
  • Loading branch information
david4096 committed Dec 9, 2016
1 parent fbf2280 commit 5b29208
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ EXPOSE 80
# Prepare container for deployment
# The directory that the user will land in when executing an interactive shell
WORKDIR /srv/ga4gh/server
RUN python scripts/prepare_compliance_data.py -o ga4gh_example_data
RUN python scripts/prepare_compliance_data.py -o ../ga4gh-compliance-data

# Default action: Bring up a webserver instance to run as a daemon
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
5 changes: 3 additions & 2 deletions deploy/001-ga4gh.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
CustomLog ${APACHE_LOG_DIR}/access.log combined
WSGIDaemonProcess ga4gh python-eggs=/var/cache/apache2/python-egg-cache \
processes=10 threads=1
WSGIScriptAlias /ga4gh /srv/ga4gh/application.wsgi
WSGIScriptAlias / /srv/ga4gh/application.wsgi
<Directory /srv/ga4gh>
WSGIProcessGroup ga4gh
WSGIApplicationGroup %{GLOBAL}
Require all granted
</Directory>
</VirtualHost>
</VirtualHost>

2 changes: 1 addition & 1 deletion deploy/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import os
DATA_SOURCE = os.getenv('GA4GH_DATA_SOURCE', "/data/registry.db")
DATA_SOURCE = os.getenv('GA4GH_DATA_SOURCE', "/srv/ga4gh/ga4gh-compliance-data/registry.db")
DEBUG = os.getenv('GA4GH_DEBUG', "")
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ From the client, the server is accessible at ``http://server/``, and the ``/tmp/

.. code-block:: bash
#make a development dir and place the example client script in it
# make a development dir and place the example client script in it
$ mkdir /tmp/mydev
$ curl https://raw.githubusercontent.com/ga4gh/server/master/scripts/demo_example.py > /tmp/mydev/demo_example.py
$ chmod +x /tmp/mydev/demo_example.py
Expand Down
11 changes: 7 additions & 4 deletions scripts/prepare_compliance_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ def run(self):
readSrc.close()
pysam.index(destFilePath)
readGroupSet = reads.HtslibReadGroupSet(dataset, name)
readGroupSet.populateFromFile(os.path.abspath(destFilePath), os.abspath(destFilePath + ".bai"))
readGroupSet.populateFromFile(os.path.abspath(
destFilePath), os.path.abspath(destFilePath + ".bai"))
readGroupSet.setReferenceSet(referenceSet)
dataset.addReadGroupSet(readGroupSet)
bioSamples = [hg00096BioSample, hg00099BioSample, hg00101BioSample]
Expand Down Expand Up @@ -272,8 +273,9 @@ def run(self):
self.repo.insertFeatureSet(featuresetG2P)

# add g2p phenotypeAssociationSet
phenotypeAssociationSet = g2p_associationset\
.RdfPhenotypeAssociationSet(dataset, "cgd", outputG2PPath)
phenotypeAssociationSet = \
g2p_associationset.RdfPhenotypeAssociationSet(
dataset, "cgd", os.path.abspath(outputG2PPath))
self.repo.insertPhenotypeAssociationSet(phenotypeAssociationSet)

self.repo.commit()
Expand Down Expand Up @@ -312,7 +314,8 @@ def addVariantSet(
dataset, variantFileName.split('_')[1])
variantSet.setReferenceSet(referenceSet)
variantSet.populateFromFile(
[os.path.abspath(outputVcf + ".gz")], [os.path.abspath(outputVcf + ".gz.tbi")])
[os.path.abspath(outputVcf + ".gz")],
[os.path.abspath(outputVcf + ".gz.tbi")])
variantSet.checkConsistency()
for callSet in variantSet.getCallSets():
for bioSample in bioSamples:
Expand Down

0 comments on commit 5b29208

Please sign in to comment.