Showing posts with label CloudFoundry. Show all posts
Showing posts with label CloudFoundry. Show all posts

Apr 10, 2012

Switching from Development to Production mode STS + Grails + CloudFoundry

Posted Apr 10, 2012
STS (as of version 2.8), by default, uses development environment when deploying a Grails application to server. Usually you would want to deploy your application in production mode instead to get the best performance.

To do this in STS, go to your project properties and navigate to Grails > Run On Server. Change the value from "dev" to "prod".



Hope this helps. My website has been deployed in Cloud Foundry for more more than a year and only now I've discovered that it's running in development mode!


Source:
http://forum.springsource.org/showthread.php?108405-Deploy-To-Cloud-Foundary-As-Prod&highlight=

Nov 24, 2011

Cloud Foundry and Custom Domain

Posted Nov 24, 2011
Currently, Cloud Foundry (CF) doesn't support mapping of external URL's (See discussion).  The workaround is to use a reverse proxy. For this job, I hosted it Google App Engine (GAE) and used BS2 GAE Reverse Proxy. Credits to yufeiwu for the free reverse proxy app.

Prerequisite:
- Also, please read the Python Tutorial for the development environment and pushing your app to Google server.

Steps:
  1. Download the reverse proxy library (license: LGPL) in http://code.google.com/p/bs2grproxy/
  2. Modify bs2grpconfig.py
    • set TARGET_HOST to your cloud foundry url
      e.g. TARGET_HOST = "mvergel.cloudfoundry.com"
  3. Modify app.yaml
    • set your registered application id
  4. Push the app and make it live

I will continue to use this approach for my website until CF have a proper DNS support.

[UPDATE] Many are encountering a problem with the session using this method. There is a patch that fixes this issue. Thank you Marius Anton for the information.