Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.54 KB

README.md

File metadata and controls

51 lines (37 loc) · 1.54 KB

PostgreSQL & PgAdmin by docker-compose

Requirements:

  • docker >= 17.12.0+
  • docker-compose

Quick Start

  • Clone or download this repository
  • Go inside of directory, cd postgres-pgadmin-docker
  • Run this command docker-compose up -d

Environments

This Compose file contains the following environment variables:

  • POSTGRES_PORT the default value is 5432
  • POSTGRES_USER the default value is postgres
  • POSTGRES_PASSWORD the default value is changeme
  • PGADMIN_PORT the default value is 5050
  • PGADMIN_DEFAULT_EMAIL the default value is [email protected]
  • PGADMIN_DEFAULT_PASSWORD the default value is admin

For you to configure your variables feel free to duplicate the .env.example file, rename the file and remove .example and include its variables.

Access to postgres:

  • localhost:5432
  • Username: postgres (as a default)
  • Password: changeme (as a default)

Access to PgAdmin:

  • URL: http://localhost:5050
  • Username: [email protected] (as a default)
  • Password: admin (as a default)

Add a new server in PgAdmin:

  • Host name/address postgres
  • Port 5432
  • Username as POSTGRES_USER, by default: postgres
  • Password as POSTGRES_PASSWORD, by default changeme

Logging

There are no easy way to configure pgadmin log verbosity and it can be overwhelming at times. It is possible to disable pgadmin logging on the container level.

Add the following to pgadmin service in the docker-compose.yml:

logging:
  driver: "none"