Skip to content

Commit

Permalink
Matthorn inside of docker launch scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyLi committed Aug 23, 2019
1 parent 604f9a6 commit 620a0fd
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
32 changes: 32 additions & 0 deletions shortcuts/matterhorn-helper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#! /usr/bin/env sh

TZ=${TZ:-Europe/Berlin}

CONFIG_FILE_VOLUME=""
CONTAINER_NAME_PARAM=""
while [ $# -gt 0 ]
do
case $1 in
-c|--config)
shift
CONFIG_FILE_VOLUME="-v $1:/etc/matterhorn/config.ini"
;;
-n|--name)
shift
CONTAINER_NAME_PARAM="--name $1"
;;
*)
>2 echo "Unknown parameter $1"
esac
shift
done

/usr/bin/docker run -it --rm \
$CONTAINER_NAME_PARAM \
$CONFIG_FILE_VOLUME \
-e TZ \
`# Add notification support` \
-e DBUS_SESSION_BUS_ADDRESS \
-v "$(echo $DBUS_SESSION_BUS_ADDRESS | cut -d= -f2):$(echo $DBUS_SESSION_BUS_ADDRESS | cut -d= -f2)" \
-u $(id -u) \
bennyli/matterhorn
3 changes: 2 additions & 1 deletion shortcuts/matterhorn-iteratec
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#! /usr/bin/env sh

/usr/bin/termite --title="Mattermost iteratec" --exec='sh -c "/usr/bin/docker run -it --rm -e TZ=Europe/Berlin -v ~/.config/matterhorn/config-iteratec.ini:/etc/matterhorn/config.ini bennyli/matterhorn"'
/usr/bin/alacritty --title "Mattermost iteratec" \
--command /bin/sh -c "~/.dotfiles/shortcuts/matterhorn-helper.sh --config ~/.config/matterhorn/config-iteratec.ini --name matterhorn-iteratec"
3 changes: 2 additions & 1 deletion shortcuts/matterhorn-iteratec-hh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#! /usr/bin/env sh

/usr/bin/termite --title="Mattermost Hamburg" --exec='sh -c "/usr/bin/docker run -it --rm -e TZ=Europe/Berlin -v ~/.config/matterhorn/config-iteratec-hh.ini:/etc/matterhorn/config.ini bennyli/matterhorn"'
/usr/bin/alacritty --title "Mattermost Hamburg" \
--command /bin/sh -c "~/.dotfiles/shortcuts/matterhorn-helper.sh --config ~/.config/matterhorn/config-iteratec-hh.ini --name matterhorn-iteratec-hh"
3 changes: 2 additions & 1 deletion shortcuts/matterhorn-iteratec-osm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#! /usr/bin/env sh

/usr/bin/termite --title="Mattermost OSM" --exec='sh -c "/usr/bin/docker run -it --rm -e TZ=Europe/Berlin -v ~/.config/matterhorn/config-iteratec-osm.ini:/etc/matterhorn/config.ini bennyli/matterhorn"'
/usr/bin/alacritty --title "Mattermost OSM" \
--command /bin/sh -c "~/.dotfiles/shortcuts/matterhorn-helper.sh --config ~/.config/matterhorn/config-iteratec-osm.ini --name matterhorn-iteratec-osm"

0 comments on commit 620a0fd

Please sign in to comment.