Reputation: 94
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
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