This repository has been created in order to give an example on how Docker containers can be easily managed inside Liferay Workspace using Gradle tasks. Please refer to this blog article for further details.
The docker-liferay-workspace-example
is intended to be used in place of blade init
command to create your Liferay Workspace. You can simply clone or download it on your workspace folder and start to play with it.
Basically this project adds some Gradle tasks and properties to the original set provided by Liferay Workspace, in order to allow a simple container management. Those elements are commented below. Moreover, it adds some additional files:
/docker/docker-compose.yml
: Docker Compose file that defines a Docker environment (containers, networks, volumes)/configs/docker/portal-ext.properties
: properties file that defines Liferay container properties. In particular, it defines the liferay-home path, that must refer to the container file systemDockerfile
: defines the Liferay image created by thebuildDockerImage
Gradle task
group: docker
type: Exec
Inits docker project environment
group: docker
type: Exec
Shuts down docker project environment
group: docker
type: Exec
Builds a Liferay Docker image based on the current local environment
type: string
default: liferay
Set the Docker Compose project name. All containers, networks and volumes created by Docker Compose will be prefixed with this name
type: string
default: /docker/docker-compose.yml
Set the Docker Compose file path. This file allows developers to start a set of Docker containers with a single gradle task
type: string
default: liferay-portal:latest
Set the generated Docker image name. The image created by dockerBuildImage Gradle task will have this tag
type: string
default: p4ssword
Set the root password for an external database container defined in Docker Compose file. Probably this property should be defined inside gradle-local.properties
file, so that it can vary between different team members (see net.saliman.properties Gradle plugin)