Skip to content

Conversation

das-g
Copy link

@das-g das-g commented Sep 17, 2022

This repo's setup uses port 15432 to expose the in-Docker PostgreSQL to the host:

services:
postgres:
container_name: demo_postgres
image: "postgres:12"
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "password"
PGDATA: "/data/postgres"
volumes:
- postgres:/data/postgres
- ./docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
ports:
- "15432:5432"

pgAdmin is exposed to the host on port 15433:

pgadmin:
container_name: demo_pgadmin
image: "dpage/pgadmin4:4.24"
environment:
PGADMIN_DEFAULT_EMAIL: admin
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: "False"
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
volumes:
- pgadmin:/var/lib/pgadmin
- ./docker_pgadmin_servers.json:/pgadmin4/servers.json
ports:
- "15433:80"

This setup uses port 15432 to
expose the in-Docker PostgreSQL to the host.
pgAdmin is exposed to the host on port 15433.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant