Add deploy step to kill previous instances of mojo container.

This commit is contained in:
jowj 2018-06-02 11:03:54 -05:00
parent 3effdab752
commit fd3f2fb1b4

View File

@ -8,5 +8,7 @@
command: cd ~/mojojojo-bot && git pull
- name: Build from the latest version
command: cd ~/mojojojo-bot && docker build -t mojo -f docker/dockerfile .
- name: Check if there are any existing mojo containers running and kill it
command: docker ps | grep 'mojo' | awk '{print $1}' | xargs docker kill
- name: Run the newly built docker container
command: docker container run -e "SLACK_BOT_TOKEN={{ VAULT_SLACK_BOT_TOKEN }}" --restart "always" -d mojo