Skip to content

Instantly share code, notes, and snippets.

@SammyVimes
Created February 15, 2016 15:55
Show Gist options
  • Save SammyVimes/e89f5ed876fc9871005c to your computer and use it in GitHub Desktop.
Save SammyVimes/e89f5ed876fc9871005c to your computer and use it in GitHub Desktop.
centrifugo config
#!/bin/bash
sudo docker run -v /centrifugo:/centrifugo -p 8001:8000 fzambia/centrifugo centrifugo -w > log.txt &
#-v "соединяет" папку на хосте с папкой в контейнере. config.json у меня лежит в /centrifugo
#и я хочу, чтобы эта папка так же была доступна в контейнере (по такому же пути)
sleep 3
echo $! >/home/semyon/script/centrifugal.pid
sudo docker ps -l -q >/home/semyon/script/docker.pid
{
"web_password": "strong_password_to_log_in",
"web_secret": "strong_secret",
"watch": true,
"secret": "very-long-secret-key"
}
#!/bin/bash
sudo docker stop `cat docker.pid`
kill -9 `cat centrifugal.pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment