Last active
November 3, 2023 23:28
-
-
Save yyandrew/c49472d3244194527f53ff605786d81d to your computer and use it in GitHub Desktop.
Scripts to deploy react app by ansistrano
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .ansistrano/build.yml | |
- shell: cd "{{ ansistrano_deploy_to }}/current" && npm install | |
- shell: cd "{{ ansistrano_deploy_to }}/current" && npm run build | |
- shell: sudo chgrp -R nginx "{{ ansistrano_deploy_to }}/current/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ansible-playbook -i .ansistrano/hosts/vagrant-vm .ansistrano/deploy.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .ansistrano/deploy.yml | |
--- | |
- name: Deploy react-boilerplate | |
hosts: all | |
vars: | |
ansistrano_deploy_from: "{{ playbook_dir }}" | |
ansistrano_deploy_to: "/var/www/react-boilerplate" | |
ansistrano_git_repo: [email protected]:yyandrew/react-boilerplate.git | |
ansistrano_git_branch: "master" | |
ansistrano_keep_releases: 0 | |
ansistrano_deploy_via: "git" | |
ansistrano_after_symlink_tasks_file: 'build.yml' | |
ansistrano_git_identity_key_remote_path: '' | |
roles: | |
- { role: ansistrano.deploy } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*.ansistrano/hosts/vagrant-vm*/ | |
web01 ansible_user=vagrant ansible_port=2222 ansible_host=127.0.0.1 ansible_ssh_private_key_file=/Users/andrew/.vagrant.d/insecure_private_key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment