services:

  postgres:
    image: postgres:16-alpine
    container_name: wpreport-postgres
    environment:
      POSTGRES_USER: wpreport
      POSTGRES_PASSWORD: wpreport_secret
      POSTGRES_DB: wpreport_dev
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    restart: unless-stopped

  redis:
    image: redis:7-alpine
    container_name: wpreport-redis
    ports:
      - "6379:6379"
    volumes:
      - redis_data:/data
    restart: unless-stopped

  pgadmin:
    image: dpage/pgadmin4:latest
    container_name: wpreport-pgadmin
    environment:
      PGADMIN_DEFAULT_EMAIL: admin@admin.com
      PGADMIN_DEFAULT_PASSWORD: admin
    ports:
      - "5050:80"
    depends_on:
      - postgres
    restart: unless-stopped

volumes:
  postgres_data:
  redis_data: