Announcement Announcement Module
Collapse
No announcement yet.
Running Greenhouse in Standard mode Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running Greenhouse in Standard mode

    Hi

    How can I run GH in standard mode? Where do I set database.url property?

    Thanks

  • #2
    mode can be set in web.xml

    <!-- Specifies the default mode of this application, to be activated if no other profile (or mode) is specified -->
    <context-param>
    <param-name>spring.profiles.default</param-name>
    <param-value>embedded</param-value>
    </context-param>

    Comment


    • #3
      We pass a VM parameter -Dspring.profiles.active=standard to switch on standard mode. We set the properties in a maven profile in our .m2/settings.xml file and ensure the profile is activated when the .war is built. We use the Maven properties plugin to generate the classpath:application.properties file read in standard mode.

      Keith

      Comment


      • #4
        Keith,

        Can you post .settings configuration as well as the maven properties plugin?

        Thanks,
        Dan

        Comment


        • #5
          Well, the Maven properties plugin is declared in the .pom.

          Our Maven .settings file looks like this, with our secure property values removed:

          Code:
          <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          	xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                                http://maven.apache.org/xsd/settings-1.0.0.xsd">
          
            <profiles>
              <profile>
                  <id>greenhouse-prod</id>
                  <properties>
                      <application.url>http://greenhouse.springsource.org</application.url>
                      <application.secureUrl>https://greenhouse.springsource.org</application.secureUrl>
                      <application.secureChannel>https</application.secureChannel>
                    
                      <database.url></database.url>
                      <database.username></database.username>
                      <database.password></database.password>
          
                      <redis.hostName></redis.hostName>
                      <redis.port></redis.port>
                      <redis.password></redis.password>
                    
                      <security.encryptPassword></security.encryptPassword>
                      <security.encryptSalt></security.encryptSalt>
          
                      <s3.accessKey></s3.accessKey>
                      <s3.secretKey></s3.secretKey>
          
                      <facebook.appId></facebook.appId>
                      <facebook.appSecret></facebook.appSecret>
                      <twitter.consumerKey></twitter.consumerKey>
                      <twitter.consumerSecret></twitter.consumerSecret>
                      <linkedin.consumerKey></linkedin.consumerKey>
                      <linkedin.consumerSecret></linkedin.consumerSecret>
                      <tripit.consumerKey></tripit.consumerKey>
                      <tripit.consumerSecret></tripit.consumerSecret>
                  </properties>
              </profile>
            </profiles>
          </settings>

          Comment


          • #6
            Keith,

            Thank you.

            One more question. I assume setting the profile as a JVM argument supersedes this setting in web.xml, correct?

            Code:
            	<!-- Specifies the default mode of this application, to be activated if no other profile (or mode) is specified -->
            	<context-param>
                	<param-name>spring.profiles.default</param-name>
                	<param-value>embedded</param-value>
            	</context-param>

            Comment


            • #7
              Keith,

              Nevermind, I figured it out with some testing.

              Comment

              Working...
              X