Run PostgreSQL and pgAdmin in docker for local development using docker compose

create a directory mkdir postgres-docker && cd postgres-dockercreate a file and name it as docker-compose.yml Add the following content in the docker-compose,yml file version: "3.8" services: db: image: postgres container_name: local_pgdb restart: always ports: - "54320:5432" environment: POSTGRES_USER: user POSTGRES_PASSWORD: admin volumes: - local_pgdata:/var/lib/postgresql/data pgadmin: image: dpage/pgadmin4 container_name: pgadmin4_container restart: always ports: - "5050:80" environment: … Continue reading Run PostgreSQL and pgAdmin in docker for local development using docker compose