Trying to fix code deploy now that full site deploy works

This commit is contained in:
2016-02-04 09:42:36 -05:00
parent 5713d75dfa
commit e46a254c0e

View File

@@ -9,10 +9,15 @@
tasks: tasks:
- name: Refresh code - name: Refresh code
command: chdir=/root/wrestlingApp git pull origin master command: chdir=/root/wrestlingApp git pull origin master
- name: Restart and rebuild docker container
command: chdir=/root/wrestlingApp bash rails-prod.sh wrestlingdev-app - name: Create apache docker image
- name: Wait 5 seconds for server to warm up command: chdir=/root/wrestlingApp docker build -t wrestlingdev-web -f rails-prod-Dockerfile .
command: sleep 5s
- name: Kill running docker container
command: docker kill wrestlingdev-web
- name: Start docker container
command: docker run -h {{ansible_hostname}} -d --restart=always --env-file /root/prod.env -v /srv/docker/apache2/logs:/var/log/apache2 -v /etc/localtime:/etc/localtime -p 80:80 -p 443:443 wrestlingdev-web
- hosts: workers - hosts: workers
remote_user: root remote_user: root
@@ -21,8 +26,12 @@
tasks: tasks:
- name: Refresh code - name: Refresh code
command: chdir=/root/wrestlingApp git pull origin master command: chdir=/root/wrestlingApp git pull origin master
- name: Restart and rebuild docker container
command: chdir=/root/wrestlingApp bash rails-worker-prod.sh wrestlingdev-worker
- name: Wait 5 seconds for server to warm up
command: sleep 5s
- name: Create apache docker image
command: chdir=/root/wrestlingApp docker build -t wrestlingdev-web -f rails-prod-Dockerfile .
- name: Kill running docker container
command: docker kill wrestlingdev-web
- name: Start docker container
command: docker run -h {{ansible_hostname}} -d --restart=always --env-file /root/prod.env -v /etc/localtime:/etc/localtime wrestlingdev-worker bundle exec rake jobs:work RAILS_ENV=production