version: '3.3'
services:
  postgres:
    image: postgres:13
    environment:
      - POSTGRES_DB=${DATABASE_NAME}
      - POSTGRES_USER=${DATABASE_USERNAME}
      - POSTGRES_PASSWORD=${DATABASE_PASSWORD}
    ports:
      - ${DATABASE_PORT}:5432
    volumes:
      - ./postgres_data:/var/lib/postgresql/data
  pg-admin:
    image: dpage/pgadmin4
    environment:
      - PGADMIN_DEFAULT_EMAIL=root@admin.com
      - PGADMIN_DEFAULT_PASSWORD=secret
    ports:
      - '5050:80'
    depends_on:
      - postgres
