git clone ssh://525953d55973ca2dcc000085@hw-chieuvh.rhcloud.com/~/git/hw.git/
copy file war to webapp directory
cp ~/share/WebGisThuyVan/dist/WebGisThuyVan.war ~/share/hw/webapps/
git add WebGisThuyVan.war
git commit -m "deploy"
git push
view log
rhc tail -a hw
stop/start rhc app-stop hw
deploy.sh
cp ~/share/WebGisThuyVan/dist/WebGisThuyVan.war webapps/
git commit -a -m "deploy"
git push
ssh to server
ssh xxx@hw-xxx.rhcloud.com
String OPENSHIFT_MYSQL_DB_HOST = System.getenv("OPENSHIFT_MYSQL_DB_HOST");
if (OPENSHIFT_MYSQL_DB_HOST != null) {
String OPENSHIFT_MYSQL_DB_PORT = System.getenv("OPENSHIFT_MYSQL_DB_PORT");
String OPENSHIFT_MYSQL_DB_USERNAME = System.getenv("OPENSHIFT_MYSQL_DB_USERNAME");
String OPENSHIFT_MYSQL_DB_PASSWORD = System.getenv("OPENSHIFT_MYSQL_DB_PASSWORD");
String databaseUrl = "jdbc:mysql://" + OPENSHIFT_MYSQL_DB_HOST + ":" + OPENSHIFT_MYSQL_DB_PORT
+ "/thuyvan?useUnicode=true&characterEncoding=UTF-8&";
AppConfig.databaseUrl = databaseUrl;
AppConfig.databaseUser = OPENSHIFT_MYSQL_DB_USERNAME;
AppConfig.databasePassword = OPENSHIFT_MYSQL_DB_PASSWORD;
}