This is a selection of docker images and docker-compose setups for developing/deploying Sakai.
tomcat - This is an Docker image ready for a copy of Sakai. It containts Java and Tomcat. This image
available from the Docker Hub as https://hub.docker.com/r/buckett/sakai-tomcat/
sakai - This is the main docker and docker-compose folder
If you are on Linux then you should install docker and docker-compose, if you're on Windows or Mac then
you should install the Docker Toolbox. If you're using the Docker Toolbox you then need to create you're
virtual machine and because Sakai has large memory requirements you should increase the default resources
allocated to it as long as your host has sufficient resources. This allocates 2GB and 2 CPUs.
export VIRTUALBOX_CPU_COUNT="2" export VIRTUALBOX_MEMORY_SIZE="2048"
then create the VM and setup docker to use this VM:
docker-machine create -d virtualbox dev eval $(docker-machine env dev)
If you're on Windows of Mac make sure that you have your Sakai deployment inside you're home folder as by default docker machine will only make those folders available to a docker container.
With your source checkout of Sakai build it and deploy it into the folder
cd sakai/checkout mvn install sakai:deploy -Dmaven.tomcat.home=/home/user/sakai/docker/sakai/tomcat
Once it's deployed bring up the application and supporting services:
cd sakai docker-compose up
This will startup a copy of MySQL and Tomcat (running Sakai). They will be configured to
use each other, to stop them all just ^C.
In general use you will probably want to start them up in the background:
docker-compose up -d
You can then look at the logs with
If you build and deploy any webapps they should be picked up, but if you want to just restart tomcat
after making changes to the build you can use:
docker-compose restart app
If you wish to test out config changes they should go in
if you wish to include them in general builds they should get put in
With your source checkout of Sakai build it it and deploy it into the foler
Once it's deployed you need to build the docker image:
docker build -t username/sakai sakai
Then to send the image to the hosting team push the image to the docker registry
docker push username/sakai
To configure Sakai we have the following files, the order listed is the order they are read with values being overritten with newer ones.:
sakai/placeholder.propertiesThis contains 99% of out config changes for Sakai, it's bundled into the container for production builds.
- sakai.properties This is where the container linking automatically happens if you are using
docker-compose. It's inside the container and shouldn't be touched.
sakai/local.propertiesHere you can put local configuration for configuration you are testing out (before putting in placeholder.properties). In production this is also where the DB configuration is put.
- security.properties In production this contains the passwords for the services we connect to (DB, Turnitin, etc)
Generally put stuff in /opt/* and put scripts that are used by docker in /opt/scripts (should be more unixy and change to /opt/bin)
If the files don't seem to be appearing inside the docker container make sure your working inside your home folder.
I am able to run docker-compose up successfully . logs show that tomcat started up in 90 ms and mysql is also up. But nothing loads up in the browser. I am trying with localhost:8000,localhost:8080,192.168.99.100:8000/126.96.36.199:8080/