Skip to content

Commit

Permalink
Merge pull request #24 from BIDS-collaborative/dav
Browse files Browse the repository at this point in the history
Working docker-compose system
  • Loading branch information
jbpoline committed Feb 25, 2016
2 parents 3925513 + 34447e9 commit bdab12c
Show file tree
Hide file tree
Showing 31 changed files with 88 additions and 466 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
data/
*.lock.file
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,30 @@ The BIDS collaborative fork of the brainspell project. Useful innovations will
be merged upstream into @r03ert0's repo (see the "forked from" link at the top
of our GitHub page).

The application has been completely dockerized. If you have a properly
configured docker-compose installation, you should be able to execute
`docker-compose up` from the `docker` directory, and then visit the application
on port 8000 in your web browser (note that Dav has experienced some trouble
with Chrome, so probably use another browser for now).

If you are using Docker Machine, don't forget that you'll need to initialize
your docker host with the following commands (or the equivalent) prior to
running `docker-compose up`:

docker-machine start
eval $(docker-machine env)

You will also be able to get the ip address of your docker host with
`docker-machine ip`.

After `docker-compose up` (or `sudo docker-compose` if you are not running in a
super user shell) the shell does not complete and messages will be showing in
the terminal. Alternatively you can run `docker-compose up -d` to have it run in
the background. CTR-C or run `docker-compose stop` to stop the containters.

On a linux install, the brainspell search did not work until you the
LuceneIndex directory was made writable by all, in the brainspell repository run:
`chmod a+w LuceneIndex/*` or `sudo chmod a+w LuceneIndex/*`



31 changes: 0 additions & 31 deletions conf/apache-site-brainspell.conf

This file was deleted.

5 changes: 0 additions & 5 deletions conf/base-apache-brainspell.conf

This file was deleted.

Empty file removed data/.gitkeep
Empty file.
20 changes: 20 additions & 0 deletions docker/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM php:5.6-apache
# Testing if this is necessary...
# RUN apt-get update && apt-get install -y php5-mysql

# This may not be the best way, but it's a way
# It may be redundant with php5-mysql above, but probably that gets all the
# dependencies we need
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install mbstring

# Need to enable headers module
RUN ln -s /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled

# This was the only option not already set for /var/www in apache conf, but we
# don't need directory listings to my knowledge...
# Options Indexes

# These are already set for /var/www
# AllowOverride All
# Require all granted
23 changes: 23 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
web:
build: apache
ports:
# We map to port 8000, as some folks may be using Docker directly on a
# host already running a web server on port 80
- "8000:80"
links:
- db
volumes:
- ../site/:/var/www/html/

db:
build: mysql
environment:
MYSQL_ROOT_PASSWORD: beo8hkii
MYSQL_DATABASE: brainspell
volumes:
# Creates trouble unless we make it world-writable or play tricks to
# match the group or user id inside and outside the container.
# By default, some Docker magic will create an external volume
# somewhere...
# - ./mysql/storage/:/var/lib/mysql/
- ./mysql/data:/docker-entrypoint-initdb.d
14 changes: 14 additions & 0 deletions docker/mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM mysql:5.7
# Image takes the following vars, see https://hub.docker.com/_/mysql/
# MYSQL_ROOT_PASSWORD=beo8hkii
# MYSQL_DATABASE=brainspell
# (these will be unused)
# MYSQL_USER, MYSQL_PASSWORD
# MYSQL_ALLOW_EMPTY_PASSWORD

# it will execute files with extensions .sh and .sql that are found in
# /docker-entrypoint-initdb.d. You can easily populate your mysql services by
# mounting a SQL dump into that directory

# We'll run this like so:
# docker run --name some-mysql -v /my/own/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag
File renamed without changes.
1 change: 0 additions & 1 deletion dockerfiles/.gitignore

This file was deleted.

34 changes: 0 additions & 34 deletions dockerfiles/Dockerfile

This file was deleted.

48 changes: 0 additions & 48 deletions dockerfiles/README.txt

This file was deleted.

31 changes: 0 additions & 31 deletions dockerfiles/apache-site-brainspell.conf

This file was deleted.

5 changes: 0 additions & 5 deletions dockerfiles/base-apache-brainspell.conf

This file was deleted.

9 changes: 0 additions & 9 deletions dockerfiles/brainspell.sh

This file was deleted.

7 changes: 0 additions & 7 deletions dockerfiles/foreground.sh

This file was deleted.

4 changes: 0 additions & 4 deletions dockerfiles/load-brainspell-db.sh

This file was deleted.

20 changes: 0 additions & 20 deletions dockerfiles/run_mysql.sh

This file was deleted.

Loading

0 comments on commit bdab12c

Please sign in to comment.