diff --git a/tools/deployment/ansible.cfg b/tools/deployment/ansible.cfg new file mode 100644 index 00000000..cc79c592 --- /dev/null +++ b/tools/deployment/ansible.cfg @@ -0,0 +1,2 @@ +[defaults] +inventory = ./hosts.ini diff --git a/tools/deployment/deploy.yml b/tools/deployment/deploy.yml new file mode 100644 index 00000000..9735711c --- /dev/null +++ b/tools/deployment/deploy.yml @@ -0,0 +1,10 @@ +--- +- hosts: web + + tasks: + - name: Pull the latest images and restart the services + shell: | + docker-compose --file docker-compose-production.yaml pull + docker-compose --file docker-compose-production.yaml up --detach + args: + chdir: oliverdavies.uk diff --git a/tools/deployment/hosts.ini b/tools/deployment/hosts.ini new file mode 100644 index 00000000..dd287268 --- /dev/null +++ b/tools/deployment/hosts.ini @@ -0,0 +1,5 @@ +[web] +188.166.154.139 + +[web:vars] +ansible_user=root