This repository was archived by the owner on Jun 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ TEMP_FOLDER=/tmp/outliers_dev
3+ TARGET_HOST=" "
4+ SLAVE_HOSTNAME=" "
5+
6+ function display_usage() {
7+ echo " Usage: ./create_dev_container.sh --host <hostname>"
8+ echo -e " \t<hostname>\tThe SSH host to deploy the dev container on"
9+ echo -e " \t<slavename>\tThe slave hostname to set in the container, this matches the hostname configured in the master"
10+ echo " "
11+ exit
12+ }
13+
14+ POSITIONAL=()
15+ while [[ $# -gt 0 ]]
16+ do
17+ key=" $1 "
18+
19+ case $key in
20+ -h|--host)
21+ TARGET_HOST=" $2 "
22+ shift # past argument
23+ shift # past value
24+ ;;
25+ --help)
26+ display_usage
27+ shift # past argument
28+ shift # past value
29+ ;;
30+ * ) # unknown option
31+ POSITIONAL+=(" $1 " ) # save it in an array for later
32+ shift # past argument
33+ ;;
34+ esac
35+ done
36+
37+ if [ " $TARGET_HOST " == " " ] ; then
38+ display_usage
39+ fi
40+
41+ rsync -rav $( pwd) --exclude virtualenv --exclude .git --exclude venv $TARGET_HOST :$TEMP_FOLDER --delete
42+ ssh $TARGET_HOST " cd $TEMP_FOLDER /ee-outliers;docker-compose build;docker stop outliers;docker-compose up -d --force-recreate;docker logs outliers_dev --follow"
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ outliers :
4+ build : .
5+ container_name : outliers_dev
6+ command : " python3 outliers.py daemon --config /mappedvolumes/config/outliers.conf"
7+ volumes :
8+ - ./defaults/outliers.conf:/mappedvolumes/config/outliers.conf
9+ networks :
10+ - sensor_network
11+ restart : always
12+
13+ networks :
14+ sensor_network :
15+ external :
16+ name : sensor_network
You can’t perform that action at this time.
0 commit comments