-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 changed file
with
27 additions
and
24 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 |
---|---|---|
@@ -1,39 +1,42 @@ | ||
FROM ubuntu:14.04 | ||
MAINTAINER Hummingbird WPS Application | ||
FROM birdhouse/bird-base:latest | ||
MAINTAINER https://github.com/bird-house | ||
|
||
LABEL Description="Hummingbird WPS Application" Vendor="Birdhouse" Version="0.2.2" | ||
|
||
# Add user phoenix | ||
RUN useradd -d /home/phoenix -m phoenix | ||
|
||
# Add bootstrap and application requirements | ||
ADD ./bootstrap.sh /tmp/bootstrap.sh | ||
ADD ./requirements.sh /tmp/requirements.sh | ||
# Set current home | ||
ENV HOME /root | ||
|
||
WORKDIR /tmp | ||
# Add application sources | ||
ADD . /opt/birdhouse | ||
|
||
# cd into application | ||
WORKDIR /opt/birdhouse | ||
|
||
# Install system dependencies | ||
RUN bash bootstrap.sh -i && bash requirements.sh | ||
|
||
# Add application sources | ||
ADD . /home/phoenix/src | ||
|
||
# Change permissions for user phoenix | ||
RUN chown -R phoenix /home/phoenix/src | ||
# Set conda enviroment | ||
ENV ANACONDA_HOME /opt/conda | ||
ENV CONDA_ENVS_DIR /opt/conda/envs | ||
|
||
# cd into application | ||
WORKDIR /home/phoenix/src | ||
# Run install | ||
RUN make clean install | ||
|
||
# Remaining tasks run as user phoenix | ||
USER phoenix | ||
# Volume for data, cache, logfiles, ... | ||
RUN chown -R www-data $CONDA_ENVS_DIR/birdhouse | ||
RUN mv $CONDA_ENVS_DIR/birdhouse/var /data && ln -s /data $CONDA_ENVS_DIR/birdhouse/var | ||
VOLUME /data | ||
|
||
# Update makefile and run install | ||
RUN bash bootstrap.sh -u && make clean install | ||
# Configure hostname and user for services | ||
ENV HOSTNAME localhost | ||
|
||
# cd into conda birdhouse environment | ||
WORKDIR /home/phoenix/.conda/envs/birdhouse | ||
# Ports used in birdhouse | ||
EXPOSE 8090 9001 8094 28094 | ||
|
||
# all currently used ports in birdhouse | ||
EXPOSE 8080 8081 8082 8090 8091 8092 8093 8094 9001 9002 | ||
# Start supervisor in foreground | ||
ENV DAEMON_OPTS --nodaemon --user www-data | ||
|
||
CMD ["bin/supervisord", "-n", "-c", "etc/supervisor/supervisord.conf"] | ||
# Update config and start supervisor ... | ||
CMD ["make", "update-config", "start"] | ||
|