version: '3.8'

services:
  postgres:
    image: postgres:15-alpine
    container_name: App-postgres
    restart: always
    environment:
      POSTGRES_USER: admin
      POSTGRES_PASSWORD: supersecretpassword123
      POSTGRES_DB: App_db
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data

  pgadmin:
    image: dpage/pgadmin4
    container_name: App-pgadmin
    restart: always
    environment:
      PGADMIN_DEFAULT_EMAIL: admin@App.com
      PGADMIN_DEFAULT_PASSWORD: adminpassword123
    ports:
      - "5050:80"
    depends_on:
      - postgres

volumes:
  postgres_data:
