WIP
This commit is contained in:
parent
bcc97afe49
commit
52797cd0c1
16
ansible/deploy.yml
Normal file
16
ansible/deploy.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- hosts: web
|
||||
|
||||
vars:
|
||||
ansistrano_deploy_to: '/var/www/oliverdavies.uk'
|
||||
ansistrano_deploy_via: 'git'
|
||||
ansistrano_git_repo: 'https://github.com/opdavies/oliverdavies.uk.git'
|
||||
ansistrano_shared_paths:
|
||||
- node_modules
|
||||
ansistrano_keep_releases: 3
|
||||
ansistrano_allow_anonymous_stats: false
|
||||
ansistrano_after_symlink_shared_tasks_file: "{{ playbook_dir }}/hooks/after-symlink-shared.yml"
|
||||
ansistrano_after_symlink_tasks_file: "{{ playbook_dir }}/hooks/after-symlink.yml"
|
||||
|
||||
roles:
|
||||
- carlosbuenosvinos.ansistrano-deploy
|
20
ansible/hooks/after-symlink-shared.yml
Normal file
20
ansible/hooks/after-symlink-shared.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
- name: "Install node dependencies"
|
||||
command: 'yarn install'
|
||||
args:
|
||||
chdir: "{{ ansistrano_release_path.stdout }}"
|
||||
|
||||
- name: 'Generate assets'
|
||||
command: 'npm run prod'
|
||||
args:
|
||||
chdir: "{{ ansistrano_release_path.stdout }}"
|
||||
|
||||
- name: 'Install Composer dependencies'
|
||||
composer:
|
||||
command: install
|
||||
working_dir: "{{ ansistrano_release_path.stdout }}"
|
||||
|
||||
- name: 'Generate the site'
|
||||
command: 'composer run prod'
|
||||
args:
|
||||
chdir: "{{ ansistrano_release_path.stdout }}"
|
3
ansible/hooks/after-symlink.yml
Normal file
3
ansible/hooks/after-symlink.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: Reload nginx
|
||||
service: name=nginx state=reloaded
|
2
ansible/hosts.ini
Normal file
2
ansible/hosts.ini
Normal file
|
@ -0,0 +1,2 @@
|
|||
[web]
|
||||
178.62.3.102
|
3
ansible/requirements.yml
Normal file
3
ansible/requirements.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- src: carlosbuenosvinos.ansistrano-deploy
|
||||
version: 2.2.0
|
Loading…
Reference in a new issue