diffgram icon indicating copy to clipboard operation
diffgram copied to clipboard

Default Storage Provider: Consider adding minio to docker compose

Open anthony-chaudhary opened this issue 2 years ago • 4 comments

Example Idea credit: @ppolxda @towr

https://github.com/diffgram/diffgram/commit/d637d2f974b74a8f746e4eb2149c383b0ccae7b5

Also https://github.com/diffgram/diffgram/commit/9608e58d1324ad4f0a1ff90ece4bfe2368b7adfe

minio:
    image: minio/minio
    environment:
      <<: *diffgram-common-env
    ports:
      - 9000:9000
      - 9001:9001
    volumes:
      - ${MINIO_DATA_DIR:-minio-data}:/data
    command: server /data --console-address ":9001"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://minio:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
    restart: always

  createbuckets:
    image: minio/mc
    depends_on:
      - minio
    environment:
      <<: *diffgram-common-env
    entrypoint: >
      /bin/sh -c " 
      echo $${DIFFGRAM_S3_BUCKET_NAME}; 
      echo $${ML__DIFFGRAM_S3_BUCKET_NAME}; 
      /usr/bin/mc alias set myminio http://minio:9000 $${MINIO_ROOT_USER}  $${MINIO_ROOT_PASSWORD};
      /usr/bin/mc mb myminio/$${DIFFGRAM_S3_BUCKET_NAME}; 
      /usr/bin/mc mb myminio/$${ML__DIFFGRAM_S3_BUCKET_NAME}; 
      exit 0; "

anthony-chaudhary avatar May 18 '22 19:05 anthony-chaudhary

That's a great idea Anthony! That would remove the need for users to know about MinIO, it can be a default thing for dev environments to better support a "No config" installation

PJEstrada avatar May 18 '22 19:05 PJEstrada

Thanks Pablo! Credit to @ppolxda

anthony-chaudhary avatar May 18 '22 22:05 anthony-chaudhary

I would really love to see this, or even a better guide on how to set diagram up to run locally or in a vm.

khronimo avatar Jul 07 '22 08:07 khronimo

Hey @khronimo

Right now our team has another priority, but contributions are always welcome

vitalii-bulyzhyn avatar Jul 07 '22 13:07 vitalii-bulyzhyn

Update We are working on this in Sept 2022

anthony-chaudhary avatar Oct 07 '22 20:10 anthony-chaudhary

Merged https://github.com/diffgram/diffgram/pull/1127

anthony-chaudhary avatar Oct 21 '22 22:10 anthony-chaudhary