Git Product home page Git Product logo

broadleaf-test's Introduction

This is an example of the Broadleaf frontend running on Heroku. The original commit was derived by building from the archetype with the mvn archetype:generate command from CLI on OSX:

~/broadleaf/heroku » mvn archetype:generate -DarchetypeGroupId=org.broadleafcommerce -DarchetypeArtifactId=ecommerce-archetype -DarchetypeVersion=1.6.0-SNAPSHOT

Then various configurations were added on top to make it play nicely with Heroku. This runs an actual instance of Tomcat which you can see with the following maven plugin in site-war/pom.xml:

<plugins>
    <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <configuration>
            <container>
                <containerId>tomcat6x</containerId>
                <zipUrlInstaller>
                    <url>http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.zip</url>
                </zipUrlInstaller>
                <dependencies>
                    <dependency>
                        <groupId>javax.activation</groupId>
                        <artifactId>activation</artifactId>
                    </dependency>
                    <dependency>
                        <groupId>javax.mail</groupId>
                        <artifactId>mail</artifactId>
                    </dependency>
                </dependencies>
            </container>
            <configuration>
                <type>standalone</type>
                <deployables>
                    <deployable>
                        <groupId>com.phillip</groupId>
                        <artifactId>site-war</artifactId>
                        <type>war</type>
                        <properties>
                            <context>ROOT</context>
                        </properties>
                    </deployable>
                </deployables>
            </configuration>
        </configuration>
        <executions>
            <execution>
                <phase>package</phase>
                <goals>
                    <goal>install</goal>
                    <goal>configure</goal>
                    <goal>deploy</goal>
                    <goal>package</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

The admin application was also stripped out from the archetype because of the slug size limit for Heroku applications. Both the site and admin applications are ~60MB and Heroku limits you to 100MB total.

Running Locally

Edit startup-foreman-local.sh and provide values that are relevant to your local instance of Postgres and the port Tomcat should run on. The app can then be launched with:

~/broadleaf/heroku » foreman start --procfile=Procfile-local

Assuming the default Tomcat port is left as-is, you should then be able to hit http://localhost:8080 to load the application

Running instance on Heroku free. The app might need to refresh itself, so just give it a while to load on first-visit.

Blog post detailing these steps to come!

broadleaf-test's People

Contributors

phillipuniverse avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.