Add an Ansible playbook to deploy to the server
This commit is contained in:
parent
5d3eb4aca9
commit
8a53025fd7
2
tools/deployment/ansible.cfg
Normal file
2
tools/deployment/ansible.cfg
Normal file
|
@ -0,0 +1,2 @@
|
|||
[defaults]
|
||||
inventory = ./hosts.ini
|
10
tools/deployment/deploy.yml
Normal file
10
tools/deployment/deploy.yml
Normal file
|
@ -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
|
5
tools/deployment/hosts.ini
Normal file
5
tools/deployment/hosts.ini
Normal file
|
@ -0,0 +1,5 @@
|
|||
[web]
|
||||
188.166.154.139
|
||||
|
||||
[web:vars]
|
||||
ansible_user=root
|
Loading…
Reference in a new issue