laravel / ideas

Issues board used for Laravel internals discussions.
938 stars 28 forks source link

Laravel Sail - Add Minio Support? #2547

Closed riipandi closed 3 years ago

riipandi commented 3 years ago

Hi folks, sometimes we need to store uploaded files to S3 storage. Instead of using AWS S3 in local development, why not use Minio? Recently, I've already using Minio within Sail.

Perhaps this code snippet can help.

    minio:
        image: 'minio/minio:latest'
        ports:
            - '${FORWARD_MINIO_PORT:-9000}:9000'
        environment:
            MINIO_ROOT_USER: '${MINIO_ROOT_USER:-AKIAIOSFODNN7EXAMPLE}'
            MINIO_ROOT_PASSWORD: '${MINIO_ROOT_PASSWORD:-wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY}'
        volumes:
            - 'sailminio:/data/minio'
        networks:
            - sail
        command: minio server /data/minio
        healthcheck:
          test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
          interval: 30s
          timeout: 20s
          retries: 3

For more information about Minio on Docker you can read here: https://github.com/minio/minio/blob/master/docs/docker/README.md

Thanks.

c-fitzmaurice commented 3 years ago

Second this for sure, Minio is great and will be a good compliment to Sail. It will have the same impact as adding MeiliSearch did.

c-fitzmaurice commented 3 years ago

This wouldn't be a heavy PR @riipandi, if you want to give it a shot. If not, I'm happy to make a PR in the next week or so.

riipandi commented 3 years ago

Yeah, I'll try @c-fitzmaurice .. thanks for the advice.

themsaid commented 3 years ago

Feel free to submit a PR with your changes.