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:
-
Open the
configs/common
folder and add theportal-setup-wizard.properties
file with thesetup.wizard.enabled=false
property. -
Open the
configs/local
folder and configure the MySQL database settings for localhost in aportal-ext.properties
file. -
Open the
configs/uat
folder and configure the MySQL database settings for the live server in aportal-ext.properties
file. -
Now that your two environments are configured, generate one of them:
blade server init --environment uat
-
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.