-
Notifications
You must be signed in to change notification settings - Fork 20
Automated Deployment (Docker)
The following describes the process by which the OOI UI and associated OOI UI Services and database server are built and launched in order to obtain a complete distribution of the OOI UI.
- Add support for building containers against specific branch or tag
- Check if there is already a running container before launching a new one?
Start with any Linux-based OS or on Windows Boot2Docker
yum -y install docker
chkconfig docker on
yum -y install git
Install supervisord
Edit or create /etc/default/docker and add this line:
DOCKER_OPTS="-r=false $DOCKER_OPTS"
Edit /etc/supervisord.conf
git clone https://github.com/oceanzus/docker-postgis.git
sudo docker build --no-cache=true -t="oceanzus/docker_postgis:v1" .
mkdir $HOME/postgres_data
sudo docker run -e USERNAME=<username> -e PASS=<password> -a stdout -a stderr --rm=true -d --name ooiuidb -v $HOME/postgres_data:/var/lib/postgresql oceanzus/docker_postgis:v1
sudo docker ps
sudo docker inspect <container id>
psql -h <ip from inspect> -U <username> -W postgres
git clone https://github.com/oceanzus/ooi-ui-services-deploy.git
sudo docker build --no-cache=true -t="oceanzus/ooi_ui_services_deploy:v1" .
sudo docker run -e HOST_IP=0.0.0.0 -e DB_PORT=<port> -e DB_USER=<user> -e DB_PASS=<password> -e DB_HOST=<url> -e DB_NAME=<database name> -e DB_RESET=<true|false> -a stdout -a stderr --rm=true -d --name ooiuiservices --link ooiuidb:ooiuidb oceanzus/ooi_ui_services_deploy:v1
sudo docker run -e HOST_IP=0.0.0.0 -e DB_PORT=<port> -e DB_USER=<user> -e DB_PASS=<password> -e DB_HOST=<url> -e DB_NAME=<database name> -e DB_RESET=<true|false> -t -i --name ooiuiservices --link ooiuidb:ooiuidb oceanzus/ooi_ui_services_deploy:v1 /bin/bash
./start_ooi-ui-services.sh
git clone https://github.com/oceanzus/ooi-ui-deploy.git
sudo docker build --no-cache=true -t="oceanzus/ooi_ui_deploy:v1" .
sudo docker run -a stdout -a stderr --rm=true -d -p <host external ip>:5000:5000 --name ooiui --link ooiuiservices:ooiuiservices oceanzus/ooi_ui_deploy:v1
sudo docker run -t -i -p <host external ip>:5000:5000 --name ooiui --link ooiuiservices:ooiuiservices oceanzus/ooi_ui_deploy:v1 /bin/bash
./start_ooi-ui.sh
sudo docker rm $(docker ps -a -q)
sudo docker rmi $(docker images -q)