services:
  minio:
    image: minio/minio
    container_name: minio
    restart: always
    ports:
      - '9000:9000'
      - '9001:9001'
    networks:
      - nice-net
    environment:
      - MINIO_ACCESS_KEY=nice1234
      - MINIO_SECRET_KEY=nice1234
    volumes:
      - ./volumes/minio:/data
    command: server /data --console-address ":9001"
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
      interval: 30s
      timeout: 20s
      retries: 3

volumes:
  storage_data:
    driver: local
    driver_opts:
      type: none
      device: /opt/projects/nice/volumes/minio
      o: bind
