PgAdmin And PostgreSQL With docker-compose.yml

https://turreta.com/2020/07/31/docker-compose-yml-for-pgadmin-and-postgresql/

https://www.youtube.com/watch?v=XeLg525z-eE


services:
  demo-container-db:
    image: postgres:12
    mem_limit: 1536MB
    mem_reservation: 1G
    environment:
      POSTGRES_USER: turreta
      POSTGRES_PASSWORD: a1128f69-e6f7-4e93-a2df-3d4db6030abc
    ports:
    - "5442:5432"
    networks:
    - turreta_network
    volumes:
    - db-data:/var/lib/postgresql/data
  demo-pgadmin4:
    image: dpage/pgadmin4
    environment:
      PGADMIN_DEFAULT_EMAIL: karl.sangabriel@gmail.com
      PGADMIN_DEFAULT_PASSWORD: a1128f69-e6f7-4e93-a2df-3d4db6030abc
    ports:
    - "8889:80"
    networks:
    - turreta_network
networks:
  turreta_network:
    driver: bridge

volumes:
  db-data:

docker container run –interactive –tty postgres:latest bash

 https://support.plesk.com/hc/en-us/articles/115003321434-How-to-enable-remote-access-to-PostgreSQL-server-on-a-Plesk-server-

https://stackoverflow.com/questions/27273412/cannot-install-packages-inside-docker-ubuntu-image

https://stackoverflow.com/questions/37694987/connecting-to-postgresql-in-a-docker-container-from-outside