-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from aurelijusb/deploy-improvements
Deploy improvements
- Loading branch information
Showing
6 changed files
with
56 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script prepares all dependent files to be deployed to server as a single .tar file | ||
# This script intended to be executed in Jenkins CI, but likelly to be extended by you. | ||
|
||
set -e # Stop on error | ||
set -x # Show commands being executed | ||
|
||
# Downloading dependencies and building frontend | ||
composer install --no-dev --no-scripts --no-interaction --optimize-autoloader | ||
yarn | ||
yarn run encore production | ||
|
||
# <-- This is a good place to add custom commands for your project | ||
|
||
# Generating deployment artifact (one file with everything you need to be deployed on the server) | ||
tar czf project.tar.gz * --exclude="node_modules" --exclude=".git" --owner 0 --group 0 --anchored |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script deploys to *.projektai.nfqakademija.lt | ||
# This script is intended to be used in Jenkins CI, where Ansible is installed | ||
|
||
set -e # Stop on error | ||
set -x # Show commands being executed | ||
|
||
# .deploy/ansible_hosts will be generated in Jenkins CI | ||
|
||
# Use Ansible to SSH to server, copy files and finish deployment there | ||
ansible-playbook -i .deploy/ansible_hosts .deploy/deploy_playbook.yaml |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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