name: meals-made-easy-api-dev
services:
  db:
    image: pgvector/pgvector:pg18-trixie
    ports:
      - "5432:5432"
    env_file: .env
    environment:
      POSTGRES_DB: meals_made_easy_api
      POSTGRES_USER: meals-made-easy-api-user
    healthcheck:
      test: pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB
      interval: 5s
      timeout: 10s
      retries: 10
      start_period: 10s
    volumes:
      - postgres-data:/var/lib/postgresql
  minio:
    image: minio/minio:latest
    ports:
      - "9000:9000"
      - "9001:9001"
    env_file:
      - .env
    environment:
      MINIO_ROOT_USER: minio-root
    volumes:
      - minio-data:/data
    command:
      - server
      - /data
      - --console-address
      - :9001
  pgadmin:
    image: dpage/pgadmin4:latest
    container_name: pgadmin
    environment:
      PGADMIN_DEFAULT_EMAIL: admin@admin.com # Your login email
      PGADMIN_DEFAULT_PASSWORD: root         # Your login password
    ports:
      - "5555:80"
    volumes:
      - ./pgadmin_data:/var/lib/pgadmin # Persistent storage for pgAdmin settings
    restart: always
volumes:
  postgres-data:
  minio-data:
