services:
  postgres:
    build:
      context: postgres
    env_file: .env
    environment:
      POSTGRES_USER: $DB_USER
      POSTGRES_PASSWORD: $DB_PASSWORD
      POSTGRES_DB: $DB_NAME
    expose:
      - 5432
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data

  mailpit:
    image: axllent/mailpit@sha256:e22dce5b36f93c77082e204a3942fb6b283b7896e057458400a4c88344c3df68
    restart: always
    ports:
      - "1025:1025"
      - "8025:8025"

volumes:
  postgres_data:
