Setting Environment Configurations for Liferay Workspace

Liferay Workspace offers the configs folder, which provides a way to organize multiple environment settings and generate a Liferay bundle for each environment configuration.

To simulate using the configs folder, you’ll explore a typical scenario. Suppose you want a local Liferay DXP installation for testing and a UAT installation for simulating a production site. Assume you want the following configuration for the two environments:

Local Environment

  • Use MySQL database pointing to localhost
  • Skip setup wizard

UAT Environment

  • Use MySQL database pointing to a live server
  • Skip setup wizard

To configure these two environments in your workspace, follow the steps below:

  1. Open the configs/common folder and add the file with the setup.wizard.enabled=false property.

  2. Open the configs/local folder and configure the MySQL database settings for localhost in a file.

  3. Open the configs/uat folder and configure the MySQL database settings for the live server in a file.

  4. Now that your two environments are configured, generate one of them:

    blade server init --environment uat
  5. To generate a distributable Liferay DXP installation of the environment to the workspace’s /build folder, run

    ./gradlew distBundle[Zip|Tar] -Pliferay.workspace.environment=uat

    You’ve successfully configured two environments and generated one of them.

Awesome! You can now test various Liferay DXP bundle environments using Liferay Workspace.

« Adding a Liferay Bundle to Liferay WorkspaceBuilding Node.js Themes in Liferay Workspace »
Was this article helpful?
0 out of 0 found this helpful