Change EC2 server IP Address.

This commit is contained in:
Kazuhiro MUSASHI 2023-07-09 20:46:44 +09:00
parent bc475f5ed5
commit dd167df1cf
3 changed files with 10 additions and 10 deletions

View File

@ -23,7 +23,7 @@ steps:
- name: housekeep - name: housekeep
image: appleboy/drone-ssh image: appleboy/drone-ssh
settings: settings:
host: 10.0.1.166 host: 10.0.1.222
username: webadm username: webadm
port: 10022 port: 10022
key: key:
@ -35,7 +35,7 @@ steps:
- name: scp - name: scp
image: appleboy/drone-scp image: appleboy/drone-scp
settings: settings:
host: 10.0.1.166 host: 10.0.1.222
username: webadm username: webadm
port: 10022 port: 10022
target: target:
@ -77,7 +77,7 @@ steps:
- name: housekeep - name: housekeep
image: appleboy/drone-ssh image: appleboy/drone-ssh
settings: settings:
host: 10.0.1.166 host: 10.0.1.222
username: webadm username: webadm
port: 10022 port: 10022
key: key:
@ -88,7 +88,7 @@ steps:
- name: scp - name: scp
image: appleboy/drone-scp image: appleboy/drone-scp
settings: settings:
host: 10.0.1.166 host: 10.0.1.222
username: webadm username: webadm
port: 10022 port: 10022
target: /var/www/test-everun target: /var/www/test-everun

View File

@ -10,9 +10,9 @@ task :prod => [ :prep ] do
sh 'find public/ -type f | egrep "\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$" | xargs -n 1 -i% -P 0 sh -c "cp % %.bk && gzip % && mv %.bk %"' sh 'find public/ -type f | egrep "\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$" | xargs -n 1 -i% -P 0 sh -c "cp % %.bk && gzip % && mv %.bk %"'
sh 'ssh -p 10022 webadm@10.0.1.166 "rm -rf /var/www/everun/*"' sh 'ssh -p 10022 webadm@10.0.1.222 "rm -rf /var/www/everun/*"'
sh 'rsync -e "ssh -p 10022" -rltvz --omit-dir-times --delete public/ webadm@10.0.1.166:/var/www/everun' sh 'rsync -e "ssh -p 10022" -rltvz --omit-dir-times --delete public/ webadm@10.0.1.222:/var/www/everun'
sh 'ssh -p 10022 webadm@10.0.1.166 "rm -rf /home/webadm/works/everun/*"' sh 'ssh -p 10022 webadm@10.0.1.222 "rm -rf /home/webadm/works/everun/*"'
sh 'rsync -e "ssh -p 10022" -rltvz --omit-dir-times --delete public/ webadm@10.0.1.166:/home/webadm/works/everun' sh 'rsync -e "ssh -p 10022" -rltvz --omit-dir-times --delete public/ webadm@10.0.1.222:/home/webadm/works/everun'
end end

View File

@ -10,6 +10,6 @@ task :stag => [ :prep ] do
sh 'find public/ -type f | egrep "\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$" | xargs -n 1 -i% -P 0 sh -c "cp % %.bk && gzip % && mv %.bk %"' sh 'find public/ -type f | egrep "\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$" | xargs -n 1 -i% -P 0 sh -c "cp % %.bk && gzip % && mv %.bk %"'
sh 'ssh -p 10022 webadm@10.0.1.166 "rm -rf /var/www/test-everun/*"' sh 'ssh -p 10022 webadm@10.0.1.222 "rm -rf /var/www/test-everun/*"'
sh 'rsync -e "ssh -p 10022" -rltvz --omit-dir-times --delete public/ webadm@10.0.1.166:/var/www/test-everun' sh 'rsync -e "ssh -p 10022" -rltvz --omit-dir-times --delete public/ webadm@10.0.1.222:/var/www/test-everun'
end end