Skip to content
Serves a web interface and RESTful API for reference genome assets.
Python HTML CSS Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
files
refgenieserver Update _version.py Jul 11, 2019
requirements Update requirements-all.txt Jul 11, 2019
.gitignore add empty tar example files for fun May 14, 2019
.travis.yml
Dockerfile pip install refgenconf after release to pypi Jul 11, 2019
README.md Update README.md Jun 15, 2019
changelog.md Update changelog.md Jul 11, 2019
dir2cfg_template.py do not assume archive path Jun 3, 2019
refgenie.yaml
setup.py

README.md

Build Status

refgenieserver

This folder contains code for an API to provide reference genomes.

Building container

  1. In the same directory as the Dockerfile:
docker build -t refgenieserverim .

Running container for development:

Mount a directory of files to serve at /genomes:

docker run --rm -p 80:80 --name refgenieservercon -v $(pwd)/files:/genomes refgenieserverim refgenieserver -c refgenie.yaml serve

Running container for production:

  1. Run the container from the image you just built:
docker run --rm -d -p 80:80 -v /path/to/genomes_archive:/genomes --name refgenieservercon refgenieserverim refgenieserver -c /genomes/genome_config.yaml serve 

Make sure the genome_config.yaml filename matches what you've named your configuration file! We use -d to detach so it's in background. Terminate container when finished:

You shouldn't need to mount the app (-v /path/to/refgenieserver:/app) because in this case we're running it directly.

docker stop refgenieservercon

Interacting with the API web server

Navigate to http://localhost/ to see the server in action.

You can see the automatic docs and interactive swagger openAPI interface at http://localhost/docs. That will also tell you all the endpoints, etc.

Monitoring for errors

Attach to container to see debug output:

docker attach refgenieservercon

Grab errors:

docker events | grep -oP "(?<=die )[^ ]+"

View those error codes:

docker logs <error_code>

Enter an interactive shell to explore the container contents:

docker exec -it refgenieservercon sh
You can’t perform that action at this time.