Starting/stopping/restarting an application
The rhc command-line client provides commands to start, stop, and restart an application. In this recipe, you will learn how to perform these commands using rhc.
Getting ready
To step through this recipe, you will need rhc installed on your machine. Also, we will make use of the OpenShift application created in the Creating an OpenShift application using the rhc command-line client recipe.
How to do it…
To start an application, run the following command:
rhc start-app --app myapp
To stop an application, run the following command:
rhc stop-app --app myapp
To restart an application, run the following command:
rhc restart-app –-app myapp
The --app
option is not required if you are running the command from within the application Git repository. When you run the command within the repository, rhc will find the domain name and the application name from the .git/config
Git repository configuration file. It uses the git config --get rhc.domain-name
command...