12 lines
523 B
YAML
12 lines
523 B
YAML
---
|
|
# This task clones the repo and runs the worker docker container.
|
|
#
|
|
- name: Copy the code from repository
|
|
git: repo={{ repository }} dest=/root/wrestlingApp
|
|
|
|
- name: Create apache docker image
|
|
command: chdir=/root/wrestlingApp docker build -t wrestlingdev-worker -f rails-prod-Dockerfile .
|
|
|
|
- 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
|