forked from ga4gh/ga4gh-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
66 lines (52 loc) · 2.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
############################################################
## Dockerfile to build the ga4gh server on mod_wsgi-express
## Configurable to use a local dataset
############################################################
FROM ubuntu
# Originally created by Steve Hershman GitHub @hershman
# previously maintained by Alastair Firth, and Maciek Smuga-Otto of the
# UCSC Genomics Institute
MAINTAINER David Steinberg <[email protected]>
# Update the sources list
RUN apt-get update --fix-missing
RUN apt-get upgrade --yes
# Install packages
RUN apt-get install -y tar git curl libcurl4-openssl-dev wget dialog \
net-tools build-essential python python-dev python-distribute \
python-pip zlib1g-dev apache2 libapache2-mod-wsgi libxslt1-dev \
libffi-dev libssl-dev
# Enable wsgi module
RUN a2enmod wsgi
# Create cache directories
RUN mkdir /var/cache/apache2/python-egg-cache && \
chown www-data:www-data /var/cache/apache2/python-egg-cache/
# build the GA4GH server
RUN mkdir -p /srv/ga4gh/server
WORKDIR /srv/ga4gh/server
# Configure the python requirements
# Do this as a separate step prior to the build so that changes
# to the GA4GH Server codebase do not trigger a full rebuild of the
# pip requirements.
COPY requirements.txt /srv/ga4gh/server/
COPY constraints.txt /srv/ga4gh/server/
RUN pip install -r requirements.txt -c constraints.txt
# Install the code
COPY . /srv/ga4gh/server/
RUN pip install . -c constraints.txt
# Write new apache config
COPY deploy/001-ga4gh.conf /etc/apache2/sites-available/001-ga4gh.conf
# Write application.wsgi
COPY deploy/application.wsgi /srv/ga4gh/application.wsgi
COPY deploy/config.py /srv/ga4gh/config.py
# Configure apache to serve GA4GH site
WORKDIR /etc/apache2/sites-enabled
RUN a2dissite 000-default
RUN a2ensite 001-ga4gh
# Open port 80 for HTTP
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-compliance-data
# Default action: Bring up a webserver instance to run as a daemon
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]