This runs a Liferay 7.2 CE instance for demo purposes.
- Installed Docker
- Installed docker-compose
- A brief understanding of Docker, Liferay and the Terminal of your operating system
Clone the project from Bitbucket and you are ready to go.
-
docker-compose up -d
-
Set a root password for Gitlab at http://127.0.0.1:8181/
-
Setup Jenkins: copy initial admin password from
docker exec -it liferaydocker_jenkins_1 cat /var/jenkins_home/secrets/initialAdminPassword
and enter it in http://127.0.0.1:8282/ -
Services are available at:
Gitlab http://127.0.0.1:8181/ Jenkins http://127.0.0.1:8282/ Liferay http://127.0.0.1:8383/
Hint: the sudo command is only needed on Linux systems, for Mac and Windows just use the command without the phrase sudo
.
Initialize / Startup Liferay
-
Open a shell in the directory of this project
-
Start the server with this command
-
Wait for Liferay to boot it takes a bit of time ;-) You can look into the logfiles (see below) to see when booting has been finished
-
Open your browser on 127.0.0.1:8080
-
Use your Liferay instance
View Liferay Logs
-
Open a shell in the directory of this project
-
View the logs with this command
-
Press
Ctrl + c
to end viewing the logs (the-f
above meant that it would follow the logs until ended)
Stop Liferay
-
Open a shell in the directory of this project
-
Stop the server with this command
-
Liferay will stop now, this takes some time too
Reset everything / restart from the beginning
-
Open a shell in the directory of this project
-
Start the server with this command
-
Now the container will be removed
The Liferay container has the ability to read specific environment variables and put these into the portal.properties
file. So it is possible to do put configurations in your compose file and every created container will start with this configuration.
- Edit the
docker-compose.yml
file - Un- / Comment the lines for demo #2 (see comments in the file)
- Proceed like described above in
Demo #1
->Initialize / Startup Liferay
If the volume mount is activated in the docker-compose.yml
file
The Liferay container will react on files in specific directories. So it is possible to do inject startup scripts, add / override files in the liferay home directory or deploy plugins into the instance on startup.
The easiest way to achieve this is to create a volumen mount (mounts a host directory into the container). In this demo I use the folder ./conf/liferay
to mount it to the correct position in the container.
- Edit the
docker-compose.yml
file - Un- / Comment the lines for demo #3 (see comments in the file)
- Have a look into the subdirectories of
./conf/liferay
to see what we change in our Liferay instance - Proceed like described above in
Demo #1
->Initialize / Startup Liferay
Now you have seen that the official Liferay container is on the one hand very beginner-friendly and on the other hand very flexible to the needs of more complex applications.
- Manuel Manhart - Initial work
- David Madl - extended with MySQL, Jenkins, and GitLab
- Docker - The container base
- Docker-Compose - Composing multiple containers into one service
- VS Code - Used to edit all the files
- Liferay Portal - The service used in the container
- Jenkins
- MySQL
- GitLab
To the time of writing this is a finished demo project, so contributing is not planned.
We do not use versioning since this is a project that was built solely for demo purposes.
This project is licensed under MIT license, feel free to clone and modify as you wish.
none I know of, if you find any, feel free to contact me