Skip to content

Commit

Permalink
start ec for dev script
Browse files Browse the repository at this point in the history
  • Loading branch information
nohaapav committed Oct 30, 2017
1 parent 5ec2c2d commit fc4406e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev/repl/user.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
(defn- on-startup
[]
(print (:out (sh "sh" "dev/script/init-db.sh")))
(print (:out (sh "sh" "dev/script/init-ec.sh")))
(install/init)
(agent/init))

Expand Down
21 changes: 21 additions & 0 deletions dev/script/init-ec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

if [ "$(docker ps -aq -f name=swarmpitec)" ];
then
echo "Swarmpit EC already exists."
if [ "$(docker ps -aq -f status=exited -f name=swarmpitec)" ];
then
echo "Swarmpit EC down. Starting ..."
docker start swarmpitec
sleep 5
else
echo "Swarmpit EC running."
fi
else
echo "Creating swarmpit EC"
docker run -d \
--name ec \
--env EVENT_ENDPOINT=http://192.168.65.1:3449/events \
--volume /var/run/docker.sock:/var/run/docker.sock \
swarmpit/swarmpit-ec:latest
fi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns swarmpit.handler-sse
(ns swarmpit.handler-events
(:require [org.httpkit.server :refer [run-server with-channel on-close send! close]]
[swarmpit.handler :refer [dispatch resp-accepted resp-error]]))

Expand Down

0 comments on commit fc4406e

Please sign in to comment.