Page 1 of 1

How to create production war and setup production DB

Posted: Fri Apr 11, 2014 3:20 pm
by nairvvin
Hi All,

I have gone through the broadleaf demo application. Now my question is how I can create a new site with a DB has only the defaut data required for the application to start. Aslo I would like to know the steps to do for production migration
I am using mysql and tomcat

Thanks in Advance

Re: How to create production war and setup production DB

Posted: Tue Apr 15, 2014 9:25 am
by phillipuniverse
In the 'core' project, there are SQL imports within src/main/resources/sql. This is demo data used for the heat clinic. This will be automatically imported into your database if you have your blPU.hibernate.hbm2ddl.auto=create-drop. The files are referenced in development-shared.properties, also in the 'core' application.

Re: How to create production war and setup production DB

Posted: Thu Apr 17, 2014 3:20 pm
by nairvvin
Thanks phillipuniverse.
I have done the application set up for the demo site. But my intention is not to use any demo data at all. I want to create a site without any demo data. only the production data i want to insert into db. Also necesory admin data.

Re: How to create production war and setup production DB

Posted: Tue Apr 22, 2014 12:06 pm
by phillipuniverse
If you are starting from complete scratch then you will need at least these import files for admin security:

/config/bc/sql/load_admin_permissions.sql -
/config/bc/sql/load_admin_roles.sql
/config/bc/sql/load_admin_menu.sql
/sql/load_admin_users.sql

The first 3 are distributed with Broadleaf and you can get them from GitHub here: https://github.com/BroadleafCommerce/Br ... fig/bc/sql. The 4th file you will find in the demo application that you downloaded.

You will probably want to have some catalog data that you can play around with. You can look at the rest of the SQL files distributed with the demo site and change them to suit your needs.

Re: How to create production war and setup production DB

Posted: Tue Apr 22, 2014 1:50 pm
by nairvvin
Thanks philp