简体   繁体   中英

How can I run a script on my server using gcloud compute?

I'm deploying my Rails apps on Compute Engine, and my code is hosted at Github. I want to push changes to my master branch, and then execute a gcloud compute command to tell my instances to pull the master repository and restart nginx.

If I can't execute a script from SSH, what's the best way to tell my instances to update to the latest git commit and restart, so my apps are running on the latest codebase?

I've tried using the Release Pipeline, but it doesn't seem to work for Rails.

You can use a server automation system for something like this. For example:

Most other server automation systems (chef, puppet) also provide some way to run a command remotely.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM