This website uses cookies to ensure you get the best experience on our website.

Skip to content
LOGO
  • Company

    About IGNEK

    Learn about our story and our mission.

    Careers

    We're hiring!

    We always looking for talented peoples. Join our team!

    Blogs

    The latest industry news, updates and info.

    Case Studies

    Take a closer look at the projects we've delivered

    Webinar

    Watch our latest organized webinar

    Get in touch with our HR team

    • hr@ignek.com
    • +91 93284 95160
    • Ahmedabad, Gujarat, India – 382470
  • Services

    Enterprise Portal Development

    Custom Enterprise Portal Development for flawless Solutions

    Dedicated Development Team

    Expand Teams, Optimize Development with Our Expertise

    Back-end Development

    Empowering your digital presence with robust backend development expertise

    Front-end Development

    Crafting engaging user experiences through expert frontend development

    Digital Transformation

    Embrace digital transformation by modernizing process

    SaaS Development

    Transform your business with SaaS Innovative Solutions

    Technologies

    Liferay Services

    Development & Customization

    Theme

    Upgradation

    Migration

    Proof of Concept

    Performance Tunning

    Architecture

    Support & Maintenance

    E-commerce

    Expert Advice

    React Services

    Enterprise Development

    Custom Application

    Single Page Application

    Architecture

    API Integration

    Migration

    Consulting

    Maintenance & Support

    Spring Boot Services

    Web Service

    MVC Web Development

    API Integration

    Security

    Migration

    Microservices

    Support & Maintenance

    AEM Services

    Consulting Service

    Site Development

    Migration & Upgradation

    Integration

    Maintenance & Support

    Custom Solutions

    Content Management

    Team Augementation

  • Solution

    Ready for digital excellence

    In our rapidly evolving world, businesses are always on the lookout for fresh ways to improve their operations and connect with their audiences.

    Contact US

    Solutions

    SaaS : Software As A Service

    Transforming industries through cutting edge SaaS solutions.

    Customer Portal : Boost Business Productivity

    Streamline operations and enhance productivity with our Customer Portal solution.

    Liferay Based Intranet Portal

    Internal portal for company communication, collaboration and resources

    Integration

    Matomo Integration with Liferay

    Integrate Matomo to enable user interactions seamlessly.

    Microsoft Teams integration with Liferay

    Integrate to enable seamless collaboration, messaging within your portal.

    Jira Integration With Liferay

    Optimizes business operations by integrating with Jira.

  • Hire Us

    Liferay

    Get expert Liferay developers for seamless portal solutions.

    React JS

    Get expert ReactJS developers for dynamic web solutions.

    Web Developer

    Get custom web solutions from IGNEK's expert developers.

    Spring Boot

    Get top-notch Spring Boot developers for your project success!

    Healthcare

    Get top Healthcare Developers for cutting-edge medical software.

    MERN Stack

    Get expert MERN developers from IGNEK for custom, innovative project solutions.

    Why Hire Developers From IGNEK ?

    • Certified Developer
    • Transparent Communication
    • Flexible Hiring Modals
    • Fully Signed NDA
    • Cost Effective
    • Easy Exit Policy

    Get in touch with our Sales team

    • sales@ignek.com
    • +91 6351576580
    • info@ignek.com
    • Ahmedabad, Gujarat, India – 382470
SCHEDULE CALL
  • COMPANY
    • About
    • Case Studies
    • Blogs
    • Career
    • Webinar
  • SERVICES
    • Enterprise Portal Development
    • Dedicated Development Team
    • Back-end Development
    • Front-end Development
    • Digital Transformation
    • SaaS Development
  • SOLUTION
    • Customer Portal:  Boost Business Productivity
    • SaaS : Software as a Service
    • Liferay Based Employee Intranet Portal
  • TECHNOLOGY
    • Liferay Services
      • Liferay Development and Customization
      • Liferay Theme Development Service
      • Liferay DXP 7.4 Upgrade
      • Liferay Migration
      • Liferay Proof Of Concept
      • Liferay Performance Tuning
      • Liferay Architecture Design Service
      • Liferay Support And Maintenance Service
      • Liferay Ecommerce Development
      • Liferay Expert Advice
    • ReactJS Services
      • ReactJS Enterprise Application Development
      • ReactJS Custom Application Development
      • ReactJS Single Page Application Development (SPA)
      • ReactJS Applications Architecture
      • ReactJS API Integration
      • ReactJS Migration
      • ReactJS Consulting
      • ReactJS Maintenance and Support
    • Spring Boot Services
      • Spring Boot Web Development Service
      • Spring MVC Web Development
      • Spring Boot API Integration Service
      • Spring Boot Security
      • Spring Boot Migration Service
      • Spring Boot Microservices
      • Spring Boot Support & Maintenance Service
    • AEM Development Services
      • AEM Consulting Services
      • AEM Site Development
      • AEM Migration & Upgradation
      • AEM Integration Services
      • AEM Maintenance & Support
      • AEM Content Management
      • Custom AEM Solutions
      • AEM Team Augmentation
  • INTEGRATION
  • HIRE US
    • Hire Liferay Developer
    • Hire ReactJS Developer
    • Hire Spring Boot Developer
    • Hire Healthcare Developer
    • Hire Web Developer
    • Hire MERN Stack Developer
  • CONTACT US
  • Company

    About IGNEK

    Careers

    We're hiring!

    Blogs

    Case Studies

    Webinar

    Get in touch with our HR team

    • hr@ignek.com
    • +91 93284 95160
    • Ahmedabad, Gujarat, India – 382470
  • Services

    Enterprise Portal Development

    Dedicated Development Team

    Back-end Development

    Front-end Development

    Digital Transformation

    SaaS Development

    Technologies

    Liferay Liferay Services
    • Development & Customization
    • Theme
    • Upgradation
    • Migration
    • Proof of Concept
    • Performance Tuning
    • Architecture
    • Support & Maintenance
    • E-commerce
    • Expert Advice
    React React Services
    • Enterprise Development
    • Custom Application
    • Single Page Application
    • Architecture
    • API Integration
    • Migration
    • Consulting
    • Maintenance & Support
    Spring Boot Spring Boot Services
    • Web Service
    • MVC Web Development
    • API Integration
    • Security
    • Migration
    • Microservices
    • Support & Maintenance
    AEM AEM Services
    • Consulting Service
    • Site Development
    • Migration & Upgradation
    • Integration
    • Maintenance & Support
    • Custom Solutions
    • Content Management
    • Team Augmentation
  • Solution

    Ready for digital excellence

    In our rapidly evolving world, businesses are always on the lookout for fresh ways to improve their operations and connect with their audiences.

    Contact US

    Solutions

    SaaS : Software As A Service

    Customer Portal : Boost Business Productivity

    Liferay Based Intranet Portal

    Integration

    Matomo Integration with Liferay

    Microsoft Teams integration with Liferay

    Jira Integration With Liferay

  • Hire Us

    Liferay

    React JS

    Web Developer

    Spring Boot

    Healthcare

    MERN Stack

    Why Hire Developers From IGNEK ?

    • Certified Developer
    • Transparent Communication
    • Flexible Hiring Modals
    • Fully Signed NDA
    • Cost Effective
    • Easy Exit Policy

    Get in touch with our Sales team

    • sales@ignek.com
    • +91 6351576580
    • IGNEK
    • Ahmedabad, Gujarat, India – 382470
  • SCHEDULE CALL

Setting Up Liferay with PostgreSQL Using Docker

  • Liferay
  • April 18, 2025

Share On :

Introduction

Nowadays, working with platforms like Liferay can get tricky when setting up across different environments. That’s where Docker comes in. It’s a practical way to keep things consistent, whether you’re developing locally or deploying in production.

Using Docker, you can bundle up Liferay and all its dependencies neatly, which saves time and avoids the usual “it works on my machine” issues. And when you bring PostgreSQL into the mix, things get even smoother, especially for setups where you need a reliable backend and can’t afford to lose data.

Why Use Docker for Liferay + PostgreSQL?

One major plus is data persistence. With Docker volumes, your data doesn’t vanish even if you shut down a container. That’s a big deal for content-heavy systems like Liferay, where every piece of data matters. Combined with PostgreSQL, you get a sturdy foundation for development and production.

Prerequisites

Before jumping in, make sure you’ve got the following ready:

  • JDK 11 or newer
  • PostgreSQL
  • Docker and Docker Compose are installed
Environment Requirements

To proceed with this setup, you should have:

  • Docker
    • Containerization engine
  • Docker Compose
    • Tool for defining and running multi-container Docker applications
Setting Up Liferay Docker for Connecting to PostgreSQL

Step 1 : How to start Liferay with Docker

If you are unaware of Liferay on Docker, start learning the basics. Follow this step-by-step guide to set up Liferay using Docker (click here):

Step 2 : Create Your Folder Structure

Start by organizing your project directory. Here’s a recommended folder structure:

				
					SERVER/
├── docker-compose.yaml
└── volumes/
   ├── liferay/
   │   ├── data/
   │   ├── deploy/
   │   ├── osgi/
   │   ├── tomcat/
   │   │   └── bin/
   │   └── portal-ext.properties
   └── postgres/
       └── data/


				
			
folder_structure

This structure helps in managing mounted volumes clearly for both Liferay and PostgreSQL.

Step 3 : Create and Configure docker-compose.yaml

Here’s the configuration you can place inside your docker-compose.yaml:

				
					services:
 postgres:
   image: postgres:13
   container_name: postgres1
   ports:
     - '5433:5432'
   environment:
     POSTGRES_USER: root
     POSTGRES_PASSWORD: root
     POSTGRES_DB: ignekBLOG
   volumes:
     - ./volumes/postgres/data:/var/lib/postgresql/data
   networks:
     - default


 liferay:
   image: liferay/portal:7.4.3.120-ga120
   container_name: liferay1
   ports:
     - "8010:8010"
     - "8082:8080"
     - "8443:8443"
     - "11311:11311"
   environment:
     LIFERAY_JPDA_ENABLED: "true"
     JPDA_ADDRESS: 8000
     JPDA_TRANSPORT: dt_socket
     LIFERAY_RETRY_PERIOD_JDBC_PERIOD_ON_PERIOD_STARTUP_PERIOD_DELAY: 10
     LIFERAY_RETRY_PERIOD_JDBC_PERIOD_ON_PERIOD_STARTUP_PERIOD_MAX_PERIOD_RETRIES: 10
     LIFERAY_JVM_OPTS: "-Xms4096m -Xmx8192m"
   depends_on:
     - postgres
   volumes:
     - ./volumes/liferay/data:/opt/liferay/data
     - ./volumes/liferay/portal-ext.properties:/opt/liferay/portal-ext.properties
     - ./volumes/liferay/deploy:/opt/liferay/deploy
     - ./volumes/liferay/osgi/modules:/opt/liferay/osgi/modules
     - ./volumes/liferay/osgi/war:/opt/liferay/osgi/war
   networks:
     - default


networks:
 default:
 external:
   name: test


				
			

Step 4 : Know about the Docker Compose Configuration

  • Volumes
    • These are used to persist data. Even if the container is removed, the data inside the volume remains safe.
  • Ports
    • Maps internal container ports to your host machine. For example, 5433:5432 means that PostgreSQL is accessible locally on port 5433.
  • Networks
    • Allow containers to communicate with each other using service names like Postgres.
  • Depends_on
    • Ensures the PostgreSQL container is started before Liferay attempts to connect.

Step 5 : Properties for the portal-ext file for database connectivity

To enable Liferay to connect with PostgreSQL, you need the following database properties inside portal-ext.properties:

				
					jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.url=jdbc:postgresql://postgres:5432/ignekBLOG
jdbc.default.username=root
jdbc.default.password=root


				
			

Note: Even if PostgreSQL is mapped to port 5433 on your local machine, within the Docker network, Liferay communicates using the internal container port 5432.

Step 6 : Operating Liferay with PostgreSQL using Docker.

To start your setup:

Open your terminal and navigate to the project directory.

				
					sudo docker-compose up


				
			

This triggers the Liferay and PostgreSQL containers at once.

docker_container_up

To manage containers:

List containers

				
					sudo docker ps -a


				
			
display_all_container
				
					//Stop containers
sudo docker-compose down

//OR

Press Ctrl + C


				
			

Step 7 : Connecting to the PostgreSQL Database

Once your containers are up, you can access PostgreSQL inside the container:

				
					sudo docker exec -it <Container ID or Name of image> /bin/bash

//In our case, it is
sudo docker exec -it postgres1 /bin/bash
				
			
for_database
				
					
Inside the bash shell:
psql -U root -d ignekBLOG



To view tables:
\dt


				
			
dt | Setting Up Liferay with PostgreSQL Using Docker

You can also be getting the logs of Liferay with your image name when you compose up the image:

logs | Setting Up Liferay with PostgreSQL Using Docker

Step 8 : Accessing the Liferay Portal

Open your browser and navigate to http://localhost:8082

You’ll be greeted with the Liferay welcome page. From here, complete the setup wizard or sign in if already configured.

welcome_page

Now navigate to the Control Panel > Server Administrator > Properties > Portal Properties.

And type jdbc.default.url into the search field. You can notice from the image below that you are successfully connected to PostgreSQL.

jdbc_default
Conclusion

Using Docker to configure Liferay with PostgreSQL streamlines the development process while improving reliability by isolating dependencies and retaining vital data. This arrangement is ideal for teams working on enterprise portals who require a consistent and repeatable development environment. Volume mounts and container orchestration enable you to create a strong and scalable platform for your Liferay projects.

Explore Our Services

Discover how we can help your business thrive, whether you’re running a small startup, an SME, or a large enterprise. We’re here to understand your unique needs and goals, offering the expertise and resources to support your journey to success.
Stay informed about our Liferay services and updates by subscribing to our newsletter—just fill in the details below to subscribe.

Loading
Loading...

Related Blogs

December 11, 2019
Customize the look feel of login portlet in Liferay Cover Image
Customize the look & feel of login portlet in Liferay
July 1, 2020
Change-look-and-feel-of-control-panel-Cover Image
Change look and feel of control panel
June 18, 2024
Efficient Log Management in Liferay
Loading...

Featured Projects Portfolios

March 21, 2024
EPF Government Enterprise Website _ Multilingual, Access for Member, Employer, Corporate - New
EPF Government Enterprise Website : Multilingual, Access for Member, Employer, Corporate
June 19, 2024
Music License Management Portal _ Onboarding & Data Integrity
Music License Management Portal : Onboarding & Data Integrity
November 29, 2024
Employee Intranet Portal for Government Entity
Employee Intranet Portal for Government Entity

Digital Solutions for Your Business with IGNEK

4.9

5.0

5.0

5.0

LOGO

Making the world a better place through constructing elegant hierarchies

COMPANY

  • About
  • Career
  • Case Study
  • Blogs

SERVICES

  • Enterprise Portal Development
  • Dedicated Development Team
  • Back-end Development
  • Front-end Development
  • Digital Transformation
  • SaaS Development

HIRE US

  • Liferay
  • Spring Boot
  • ReactJS
  • Healthcare
  • MERN Stack
  • AEM

CONTACT

  • info@ignek.com
  • info@ignek.com
SALES
  • sales@ignek.com
  • (+91) 635 157 6580
CAREER
  • hr@ignek.com
  • (+91) 932 849 5160
  • E 910-912, Ganesh Glory 11, Jagatpur Road, SG Highway, Ahmedabad, Gujarat - 382470

© 2018-2025 IGNEK, Inc. All rights reserved

Linkedin Facebook X-twitter Instagram