Garamoff
Garamoff

Reputation: 94

Liquibase and Postgresql integration

How to connect to Postgresql in docker container from Liquibase which was installed on host machine? I don't want to include liquibase as dependency in Maven.

Upvotes: 0

Views: 128

Answers (1)

bilak
bilak

Reputation: 4932

Just open docker port to the host and connect to it from liquibase:

version: '3'
services:
  postgres:
    image: postgres
    volumes:
      - ./.postgresql/data:/var/lib/postgresql/data
    ports:
      - "5432:5432"
    environment:
      POSTGRES_DB: yourdb
      POSTGRES_USER: youruser
      POSTGRES_PASSWORD: yourpassword

Upvotes: 1

Related Questions