ecwebservices's avatar

Jetstream in Sail, profile upload to Minio not working

I'm running A fresh jetstream install in Sail, and set up sail to include MinIO. From there, I had created a bucket called "dev" in MinIO. I changed my APP_URL to equal where I'm accessing the site from as well, but whenever I upload an image, the submit button stays greyed out.

My .env file:

APP_NAME=Laravel
APP_ENV=local
APP_KEY=removedforpost
APP_DEBUG=true
APP_URL=http://site.test

LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=sail
DB_USERNAME=sail
DB_PASSWORD=password

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=database
SESSION_LIFETIME=120

MEMCACHED_HOST=memcached

REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

FILESYSTEM_DRIVER=s3
AWS_ACCESS_KEY_ID=sail
AWS_SECRET_ACCESS_KEY=password
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=dev
AWS_ENDPOINT=http://minio:9000
AWS_USE_PATH_STYLE_ENDPOINT=true

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

What might I be doing wrong?

0 likes
3 replies
ecwebservices's avatar

Seeing that there are currently 481 views, with no responses, it feels like this is something I'm not the only one struggling with this. Hopefully, someone can find an answer to this.

3 likes
pSouper's avatar

Did you set your bucket policy permissions?

you could try that. it will need to be read & write.

*Open & login to your mino browser. hover over your dev bucket and click the vertical ellipsis icon. fom there you can set the policy.

jpcaparas's avatar
AWS_ACCESS_KEY_ID=sail
AWS_SECRET_ACCESS_KEY=password
AWS_ENDPOINT=minio:9000
AWS_URL=localhost:9000/local
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=local
AWS_USE_PATH_STYLE_ENDPOINT=true

I stripped out the http prefixes on AWS_ENDPOINT and AWS_URL since I cannot post links yet. Just add them back.

Pay close attention to AWS_URL and AWS_ENDPOINT directives.

Since you are running Laravel inside a Docker network through Sail, your internal ENDPOINT should use the Docker network hostname, minio, which matches the service name on your docker-compose.yml file. The AWS_URL, however, is the host-machine viewable URL, so it should remain as localhost since the host machine has no semblance of the DNS hostnames you have inside of Docker.

A couple of things to look out for as well:

  • Make sure that the AWS_BUCKET directive matches the actual bucket name created inside minio
  • Ensure that you have R/W permissions on the bucket.

Please or to participate in this conversation.