A Docker image for OpenMRS Atlas http://atlas.openmrs.org
Inspired by Discourse Docker
- Make sure you're running a 64 bit version of either Ubuntu 12.04 LTS, or Ubuntu 14.04.
- Upgrade to the latest version of Docker.
- Run the docker installation and launcher as root or a member of the docker group.
- Add your user account to the docker group:
usermod -a -G docker yourusername
and re-login.
If you do not do any of the above, as RoboCop once said, "there will be… trouble." Please double check the above list before proceeding!
The simplest way to get started is the standalone template:
- Clone this project from github into
/var/atlas
on your server:git clone https://github.com/alexisduque/atlas-docker.git /var/atlas
- Configure environnement variable, hostname, ports
binding in atlas.cfg
- Build the image:
sudo ./launcher build atlas
- Start the image:
sudo ./launcher start atlas
Note 1: you can add yourself to the Docker group if you wish to avoid sudo
with usermod -aG docker <your-user-name>
.
Note 2: you can build multiple atlas containers with different configurations, changing its name : sudo ./launcher start atlas-first
and sudo ./launcher start atlas-test
.
Rename atlas.cfg.sample to atlas.cfg and chaqnge values with your configuration :
HTTP_PORT
: http port to access Atlas application (use 80, shutdown apache on your host)HTTPs_PORT
: https port to access Atlas application (use 443, shutdown apache on your host)SSH_PORT
: port number to ssh to the container (use, 22 or 23 if sshd is allready running on your host)HOST
: choose your container hostnameMYSQL_PASSWORD
: root mysql pqsswordAPI_KEY
: ID API key for AtlasSITE_KEY
: ID Site key for AtlasSAMPLE_DATA
: set 1 to load a sample datasetSERVER_URL
: your server URL (for ID multipass callback - http://server-ip/)CAPTURE_URL
: your server URL (for ID multipass callback)SERVER_DATA
: URL to get JSON with markers (http://server-ip/data.php?callback=loadSites)
Contains container ids for currently running Docker containers. cids are Docker's "equivalent" of pids. Each container will have a unique git like hash.
This directory is for container definitions for your various Discourse containers. You are in charge of this directory, it ships empty.
Dockerfile for both the base image atlas_base
and atlas image Comming soon .....
.
-
atlas_base
contains all the OS dependencies including sshd, apache2, mysql, php5, phantomJS, composer. -
atlas_20
builds on the base image and configures Atlas Server.
The base directory contains a single bash script which is used to manage containers. You can use it to "build" a new container, ssh in, start, stop and destroy a container.
Usage: launcher COMMAND CONFIG
Commands:
start: Start/initialize a container
stop: Stop a running container
restart: Restart a container
destroy: Stop and remove a container
ssh: Start a bash shell in a running container
logs: Docker logs for container
build: Build a container for the config based on a template
update: Destroy and build an Atlas App container based on atlas_base (doesn't affects base image)
Update Atlas Application
git clone https://https://github.com/alexisduque/atlas-docker
./launcher update atlas
./launcher start atlas
Create a new base image by running:
./launcher destroy my_image
./launcher build my_image
./launcher start my_image