version: "3.8"
services:
  postgres: 
    image: postgres:16-alpine
    container_name: my-db
    ports:
    - 5432:5432
#    volumes:
#    - postgres-data:/var/lib/postgresql/data
    environment:
    - POSTGRES_PASSWORD=password
    networks:
    - pg_net
  pgamdmin4:
    image: dpage/pgadmin4:7
    container_name: pgadmin4
    ports:
    - 8080:80
    volumes:
    - pgadmin-data:/var/lib/pgadmin
    environment:
    - PGADMIN_DEFAULT_EMAIL=tarvo@domain.com
    - PGADMIN_DEFAULT_PASSWORD=salajane
    networks:
    - pg_net
networks:
  pg_net:
volumes:
  pgadmin-data:
# postgres-data: