inital commit
This commit is contained in:
17
sendtoproduction/.custom_commands.sh
Normal file
17
sendtoproduction/.custom_commands.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# copies the project directory from 100 server to 98 and 114
|
||||
function deploy() {
|
||||
#chown root:root /var/www/html/ -R;
|
||||
#find /var/www/html/ -type d -exec chmod 777 {} \;
|
||||
|
||||
|
||||
|
||||
rsync -avzhe ssh --owner --group --progress --recursive --files-from="include.txt" --exclude-from="exclude.txt" "/var/www/html/" "root@45.55.43.211:/var/www/html/"
|
||||
|
||||
pssh -A -i -H "45.55.43.211" -l root 'chown -R www-data:www-data /var/www/html && chmod -R 1777 /var/www/html/webroot && chmod -R 1777 /var/www/html/webroot/*'
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
25
sendtoproduction/.test_pssh.sh
Normal file
25
sendtoproduction/.test_pssh.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# copies the project directory from 100 server to 98 and 114
|
||||
function deploy() {
|
||||
chown apache:apache /opt/app.sipay.com.tr/ -R;
|
||||
find /opt/app.sipay.com.tr/ -type d -exec chmod 755 {} \;
|
||||
# find /opt/app.sipay.com.tr/ -type f -exec chmod 644 {} \;
|
||||
chmod 777 /opt/app.sipay.com.tr/storage /opt/app.sipay.com.tr/vendor /opt/app.sipay.com.tr/sipayresource -R;
|
||||
|
||||
while IFS= read -r dest; do
|
||||
### mysql -uappadmin -pAdmin#902117 -h176.53.34.98 sipay_new < /opt/app.sipay.com.tr/sipay.sql
|
||||
rsync -avzhe ssh --owner --group --progress --exclude-from="exclude.txt" "/opt/app.sipay.com.tr/" "$dest:/opt/app.sipay.com.tr"
|
||||
rsync -avzhe ssh --owner --group --progress "/opt/app.sipay.com.tr/sipayresource/assets" "$dest:/opt/app.sipay.com.tr/sipayresource/assets"
|
||||
# echo "testing24"
|
||||
#
|
||||
done <destfile.txt
|
||||
#
|
||||
## echo "" > /opt/app.sipay.com.tr/sipay_sql.sql;
|
||||
|
||||
#pssh --hosts hosts.txt --user root -i -A 'cd /opt/app.sipay.com.tr && php artisan view:clear && php artisan config:cache && php artisan cache:clear && php artisan route:clear && cd admin && php artisan view:clear && php artisan config:cache && php artisan cache:clear && php artisan route:clear'
|
||||
#
|
||||
/bin/pssh -A -i -H "176.53.34.104" -l bruce 'chown -R apache:apache /opt/app.sipay.com.tr/ && chmod -R 1777 /opt/app.sipay.com.tr/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/public/files && chmod -R 1777 /opt/app.sipay.com.tr/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/public/files && chmod -R 1777 /opt/app.sipay.com.tr/admin/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/public/files && chmod -R 1777 /opt/app.sipay.com.tr/merchant/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/public/files && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/public/files/* && cd /opt/app.sipay.com.tr/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/admin/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan cache:clear'
|
||||
/bin/pssh -A -i -H "176.53.6.134" -l bruce 'chown -R apache:apache /opt/app.sipay.com.tr/ && chmod -R 1777 /opt/app.sipay.com.tr/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/public/files && chmod -R 1777 /opt/app.sipay.com.tr/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/public/files && chmod -R 1777 /opt/app.sipay.com.tr/admin/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/public/files && chmod -R 1777 /opt/app.sipay.com.tr/merchant/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/public/files && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/public/files/* && cd /opt/app.sipay.com.tr/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/admin/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan cache:clear'
|
||||
chown apache:apache /opt/app.sipay.com.tr/ -R;
|
||||
chmod 777 /opt/app.sipay.com.tr/ -R;
|
||||
}
|
||||
2
sendtoproduction/destfile.txt
Normal file
2
sendtoproduction/destfile.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
bruce@176.53.34.104
|
||||
bruce@176.53.6.134
|
||||
72
sendtoproduction/exclude.txt
Normal file
72
sendtoproduction/exclude.txt
Normal file
@@ -0,0 +1,72 @@
|
||||
/.idea
|
||||
/vendor
|
||||
/epicvelocity
|
||||
/db
|
||||
/api_resource
|
||||
/auto_script
|
||||
/logs
|
||||
/tmp
|
||||
/epicvelocity1
|
||||
/src_OLD
|
||||
/src.zip
|
||||
/migrate.zip
|
||||
/TestDeploymeent
|
||||
/config/app.settings.php
|
||||
/webroot/rtg_letters
|
||||
/webroot/member_email_attachment
|
||||
/webroot/member_email_template_attachment
|
||||
/webroot/credit_analysis_template
|
||||
/webroot/credit_analysis_pdf
|
||||
/webroot/Staff/pdf
|
||||
/webroot/Staff/rtg_letters_error.txt
|
||||
/webroot/V2.0/rtg_letters_error.txt
|
||||
/webroot/V2.0/rtg_client_ids_error.txt
|
||||
/webroot/Staff/rtg_client_ids_error.txt
|
||||
/webroot/Staff/sertg_export_error.txt
|
||||
/webroot/Staff/rtg_sertg_export_error.txt
|
||||
/webroot/V2.0/rtg_sertg_export_error.txt
|
||||
/webroot/V1.0/rtg_sertg_export_error.txt
|
||||
/webroot/V3.0/rtg_sertg_export_error.txt
|
||||
/webroot/rtg_sertg_export_error.txt
|
||||
/webroot/Staff/sertg_log.txt
|
||||
/webroot/forum/inc/config.php
|
||||
/webroot/Staff/sertg
|
||||
/webroot/Staff/vendor
|
||||
/webroot/AdminAccountImage
|
||||
/webroot/AdminAccountImage
|
||||
/webroot/agreement_signed_content
|
||||
/webroot/agreenment_contents
|
||||
/webroot/attach-documents
|
||||
/webroot/chat_attachment
|
||||
/webroot/client_agreement_files
|
||||
/webroot/cmsuser_logo
|
||||
/webroot/compiles
|
||||
/webroot/contact_photo
|
||||
/webroot/epicvelocity/clients_docs
|
||||
/webroot/epicvelocity/letters
|
||||
/webroot/epicvelocity/lib
|
||||
/webroot/epicvelocity/pdf
|
||||
/webroot/epicvelocity/vendor
|
||||
/webroot/epicvelocity/images
|
||||
/webroot/file_path
|
||||
/webroot/html_content
|
||||
/webroot/html_history_code
|
||||
/webroot/invoice-logo
|
||||
/webroot/media
|
||||
/webroot/member_education_templates
|
||||
/webroot/member_help_templates
|
||||
/webroot/mpdf60
|
||||
/webroot/payment_vendor
|
||||
/webroot/project-media-files
|
||||
/webroot/rtg_optimize
|
||||
/webroot/supportsfile
|
||||
/webroot/user-photo
|
||||
/webroot/velocity
|
||||
/webroot/dropbox
|
||||
/webroot/backend
|
||||
/webroot/backup_resources
|
||||
/webroot/member_email_template_body
|
||||
/webroot/client_popup_content
|
||||
/webroot/email_queue
|
||||
/webroot/certificates/pdf
|
||||
/webroot/pdfletters
|
||||
2
sendtoproduction/hosts.txt
Normal file
2
sendtoproduction/hosts.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
104.sipay.com.tr
|
||||
134.sipay.com.tr
|
||||
36
sendtoproduction/include.txt
Normal file
36
sendtoproduction/include.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
/config/app.default.php
|
||||
/config/app.constant.php
|
||||
/config/app.php
|
||||
/config/bootstrap.php
|
||||
/config/bootstrap_cli.php
|
||||
/config/paths.php
|
||||
/config/routes.php
|
||||
/src/
|
||||
/webroot/Staff/
|
||||
/webroot/Staff/dbconfig.php
|
||||
/webroot/common_script_file.js
|
||||
/webroot/common_image_file.php
|
||||
/webroot/rtg_ls_fax_common.php
|
||||
/webroot/common_file.php
|
||||
/webroot/V2.0/
|
||||
/webroot/Staff/
|
||||
/webroot/Staff/getSertgInfo.php
|
||||
/webroot/js
|
||||
/webroot/css
|
||||
/webroot/images
|
||||
/webroot/admin_lte
|
||||
/webroot/rtgv3
|
||||
/webroot/new_layout
|
||||
/webroot/epicvelocity/css
|
||||
/webroot/epicvelocity/js
|
||||
/webroot/functions.php
|
||||
/config/dynamic_domain.php
|
||||
/webroot/RTG
|
||||
/webroot/V3.0
|
||||
/webroot/df.json
|
||||
/webroot/Redis/Cache.php
|
||||
/webroot/dropbox/success.php
|
||||
/webroot/certificates/img/
|
||||
/webroot/certificates/fonts/
|
||||
/webroot/GlobalLogic.php
|
||||
|
||||
14
sendtoproduction/readme.txt
Normal file
14
sendtoproduction/readme.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
1. copy sendtoproduction folder to user home directory
|
||||
cd sendtoproduction
|
||||
|
||||
2. edit the hosts.txt, destfile.txt, exclude.txt as you need:
|
||||
hosts.txt file holds the host servers IPs,
|
||||
destfile.txt file holds user name with host IPs,
|
||||
exclude.txt file is the the files to ignore from deploying.
|
||||
|
||||
3. type in terminal and it will enable the command:
|
||||
source .custom_commands.sh
|
||||
|
||||
4. type in terminal and it will run the code and deploy to servers when you provide passwords:
|
||||
|
||||
deploy
|
||||
Reference in New Issue
Block a user