Axelor Doc

Deployment

Loading of the database

$ sudo -i -u postgres
$ createdb -O axelor axelor_db          # Create the database here as axelor_db with the user axelor
$ psql axelor_db -f /path/to/dump.sql #Chargement

Generation of war

The war is generated from the project sources. However, you must have configured the file persistence.xml in the directory axelor-demo/src/main/resources/META-INF . The items to be set are:

  • <property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/db_Name" />: db_name is the name of the database previously configured
  • <property name="javax.persistence.jdbc.user" value="" />: value is the user who created the database (in this example, the user is Axelor)
  • <property name="javax.persistence.jdbc.password" value="" />: value corresponds to the password of the user who created the database (in this example, the password of the user Axelor)

Then, the following commands are used to generate the war:

$ cd /path/to/source
$ mvn -Dmaven.test.skip=true -U clean install

In the event that the war is already providing you, the persistence file is in the war. This is to configure your environment. It is in the war itself: <path.to.tomcat>/webapps/.war/WEB-INF/classes/META-INF/persistence.xml

Deploying the war

$ cd /path/to/tomcat
$ cp path_to_source/axelor-demo/target/axelor-demo-0.9.0-SNAPSHOT.war webapps/axelor.war    #Copier the war in the webapps / tomcat
$ ./bin/catalina.sh start    # Start the server

The deployment of the application may take a few minutes depending on the project. During this period, some elements are loaded, such as views, actions, menus, ... in the case of an empty database.

The application can be used from a browser to this URL: localhost:8080/axelor

Reloading views

In development environment, you may have to reload the metadata from the source to the database. In this case before the deployment of the application, it should delete data having a number table. The script delete_meta.sql is available to facilitate this step. The deployment of the application, these tables will be reloaded from the source.