Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

Alpine / unified #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 12 additions & 44 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,16 @@
# WebApollo
# VERSION 2.0
FROM tomcat:8-jre8
FROM quay.io/gmod/docker-apollo:unified
MAINTAINER Eric Rasche <[email protected]>, Anthony Bretaudeau <[email protected]>, Nathan Dunn <[email protected]>
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get -qq update --fix-missing && \
apt-get --no-install-recommends -y install \
git build-essential maven tomcat8 libpq-dev postgresql-common openjdk-8-jdk wget \
postgresql postgresql-client xmlstarlet netcat libpng12-dev \
zlib1g-dev libexpat1-dev ant curl ssl-cert

RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get -qq update --fix-missing && \
apt-get --no-install-recommends -y install nodejs && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN npm install -g bower && \
cp /usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/tools.jar && \
useradd -ms /bin/bash -d /apollo apollo

ENV WEBAPOLLO_VERSION 7b304aac81f7dab77165f37bf210a6b3cb1b8080
RUN curl -L https://github.com/GMOD/Apollo/archive/${WEBAPOLLO_VERSION}.tar.gz | tar xzf - --strip-components=1 -C /apollo


COPY build.sh /bin/build.sh
ADD apollo-config.groovy /apollo/apollo-config.groovy

RUN chown -R apollo:apollo /apollo
USER apollo
RUN bash /bin/build.sh
USER root

ENV CATALINA_HOME=/usr/local/tomcat/
RUN rm -rf ${CATALINA_HOME}/webapps/* && \
cp /apollo/apollo*.war ${CATALINA_HOME}/apollo.war

ENV CONTEXT_PATH ROOT

# Download chado schema
RUN wget --quiet https://github.com/erasche/chado-schema-builder/releases/download/1.31-jenkins97/chado-1.31.sql.gz -O /chado.sql.gz && \
gunzip /chado.sql.gz
ADD user.sql /apollo/user.sql

ADD launch.sh /launch.sh
CMD "/launch.sh"


RUN apk update && \
apk add bash perl make gcc perl-dev musl-dev db-dev && \
cd / && \
wget http://jbrowse.org/wordpress/wp-content/plugins/download-monitor/download.php?id=109 -O JBrowse-1.12.3.zip && \
unzip JBrowse-1.12.3.zip && \
rm JBrowse-1.12.3.zip && \
cd JBrowse-1.12.3 && \
sed -i 's|bin/cpanm|bin/cpanm --no-wget|g' setup.sh && \
./bin/cpanm local::lib --no-wget && \
bash setup.sh && \
apk del make gcc perl-dev musl-dev db-dev
53 changes: 25 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
# Apollo

![Apollo Logo](https://github.com/GMOD/docker-apollo/raw/master/img/ApolloLogo_100x36.png)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.268535.svg)](https://doi.org/10.5281/zenodo.268535)

# ![Apollo](img/ApolloLogo_100x36.png) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.268535.svg)](https://doi.org/10.5281/zenodo.268535) [![Docker Repository on Quay](https://quay.io/repository/gmod/docker-apollo/status "Docker Repository on Quay")](https://quay.io/repository/gmod/docker-apollo)

> Apollo is a browser-based tool for visualisation and editing of sequence
> annotations. It is designed for distributed community annotation efforts,
> where numerous people may be working on the same sequences in geographically
> different locations; real-time updating keeps all users in sync during the
> editing process.

## Running the Container
## Quickstart

The container is publicly available as `gmod/apollo:stable`. The recommended
method for launching the container is via docker-compose due to a dependency on
a postgres image.
If you've never used docker before, first you will need to [install it](https://docs.docker.com/engine/installation/).

There are a large number of environment variables that can be adjusted to suit
your site's needs. These can be seen in the
[apollo-config.groovy](https://github.com/GMOD/Apollo/blob/master/sample-docker-apollo-config.groovy)
file.
There are several flavours of Apollo images, based on your needs:

## Quickstart
Image | Contents | Comments
---------- | ------------------------------ | -------------
`:latest` | Apollo + Chado + JBrowse Tools | This is the easiest image to get started with. Just run `docker run -it -p 8080:8080 quay.io/gmod/docker-apollo`
`:unified` | Apollo + Chado | Very similar to the `:latest` image, but does not include the JBrowse tools. Use this if you already have a JBrowse instance you wish to annotate
`:bare` | Apollo | The most lightweight image, especially for admins and people wishing to deploy Apollo in production.

You can launch these images with `docker run` commands:

This procedure starts tomcat in a standard virtualized environment with a PostgreSQL database with [Chado](http://gmod.org/wiki/Introduction_to_Chado).
```console
$ docker run -it -p 8080:8080 quay.io/gmod/docker-apollo:latest
$ docker run -it -p 8080:8080 quay.io/gmod/docker-apollo:unified
```

- Install [docker](https://docs.docker.com/engine/installation/) for your system if not previously done.
- `docker run -it -p 8888:8080 gmod/apollo:2.0.6` # for a tested release
- `docker run -it -p 8888:8080 gmod/apollo:latest` # for the latest, remember to ```docker pull gmod/apollo``` to fetch newer versions
- `docker run -it -p 8888:8080 gmod/apollo:apollo-only` # from apollo only (no postgresql)
- `docker run -it -v /jbrowse/root/directory/:/data -p 8888:8080 gmod/apollo:latest`
- `docker run -it -v /jbrowse/root/directory/:/data -p 8888:8080 quay.io/gmod/docker-apollo` # built by quay.io
- Apollo will be available at [http://localhost:8888/](http://localhost:8888/) (or 8888 if you don't configure the port)
If you need to load data, you can mount a volume into the docker container:

When you use the above mount directory ```/jbrowse/root/directory``` and your genome is in
```/jbrowse/root/directory/myawesomegenome``` you'll point to the directory: ```/data/myawesomegenome```.
```console
$ docker run -it -v /jbrowse/dir/:/data -p 8080:8080 quay.io/gmod/docker-apollo
```

When you access this data within Apollo, you should refer to `/jbrowse/dir/my-organism` as `/data/my-organism`

### Logging In

Expand All @@ -48,10 +47,8 @@ The default credentials in this image are:

### Loading Data

Some sample data is baked into the container for you to play around with:

![](./img/sample.png)

### Chado
Sample data is available within the container thanks to the JBrowse installation in this image. E.g.:

Chado support is now baked into the GMOD docker container image.
- `/JBrowse-1.12.3/sample_data/json/volvox`
- `/JBrowse-1.12.3/sample_data/json/yeast`
- `/JBrowse-1.12.3/sample_data/json/modencode`
128 changes: 0 additions & 128 deletions apollo-config.groovy

This file was deleted.

8 changes: 0 additions & 8 deletions build.sh

This file was deleted.

29 changes: 0 additions & 29 deletions launch.sh

This file was deleted.

3 changes: 0 additions & 3 deletions user.sql

This file was deleted.