ddev-contrib
ddev-contrib copied to clipboard
Add MinIO Docker Compose Service
The New Solution/Problem/Issue/Bug:
This recipe adds a MinIO container to a project.
MinIO is a S3 compatible object-storage. It can be used, to run an S3 instance locally, in case the hosted S3 is not reachable (like developing while offline)
Manual Testing Instructions:
Follow the instructions from docker-compose-services/minio/README.md
.
Expected result:
- A working MinIO instance is available in the project.
- The object browser is available at
https://<projectname>.ddev.site:9000
. - All files uploaded through the object browser can be listed with
ddev exec -s minio ls -al /data/default
Thanks!
Looking forward to getting this in @NBZ4live and thanks for the contribution. Please just pull the suggested commits and rebase and respond to other comments and we can move forward.
Tried following the steps but unfortunately doesn't seem to be working. Do you know if this should work with the m1 chips?
https://drupal9-ddev.ddev.site:9000/ redirects to http://drupal9-ddev.ddev.site:39085/ and throws a connection refused error
When I change the port from 9000 to 9005 and try to visit the url I get
502: Unresponsive/broken ddev back-end site. This is the ddev-router container: The back-end webserver at the URL you specified is not responding. You may want to use "ddev restart" to restart the site.
Okay finally got it working
`version: '3.6' services: minio: container_name: ddev-${DDEV_SITENAME}-minio build: context: './minio-build' restart: always ports: - "9010" labels: com.ddev.site-name: ${DDEV_SITENAME} com.ddev.approot: $DDEV_APPROOT environment: - VIRTUAL_HOST=$DDEV_HOSTNAME - HTTP_EXPOSE=9011:9010 - HTTPS_EXPOSE=9010:9010 - MINIO_ROOT_USER=minio - MINIO_ROOT_PASSWORD=minio123 command: server /data --console-address :9010 volumes: - type: "volume" source: minio target: "/data" volume: nocopy: true - type: "bind" source: "." target: "/mnt/ddev_config" web: links: - minio:$DDEV_HOSTNAME
volumes: minio: name: "${DDEV_SITENAME}-minio" `
@mglaman points out that he has minio going on https://github.com/bluehorndigital/mojo
Hi @rfay any info on this? I was hoping to have a service as well for local development.
if I use this file
version: '3.6'
services:
storage:
container_name: ddev-${DDEV_SITENAME}-minio
image: minio/minio
command: 'server /data --console-address ":9001" --address ":8080" '
volumes:
- storage:/data
environment:
- LOG_LEVEL=trace
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
- MINIO_DOMAIN=storage
# DDEV configurations to expose MinIO over the network.
- VIRTUAL_HOST=$DDEV_HOSTNAME
- HTTP_EXPOSE=8081:8080
- HTTPS_EXPOSE=8080:8080
expose:
- '8080'
- '9001'
labels:
# These labels ensure this service is discoverable by ddev
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
networks:
default:
aliases:
- mojodata.storage
storage_cli:
container_name: ddev-${DDEV_SITENAME}-mc
image: minio/mc
depends_on:
- storage
entrypoint: /bin/bash
stdin_open: true
tty: true
web:
environment:
FILESYSTEM_DRIVER: s3
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
AWS_DEFAULT_REGION: us-east-1
S3_BUCKET: mojodata
S3_PROTOCOL: https
S3_CNAME: ${DDEV_SITENAME}.ddev.site:8080
S3_ENDPOINT: http://storage:8080
S3_USE_PATH_STYLE_ENDPOINT: 1
S3_CNAME_IS_BUCKET: 0
links:
- storage:$DDEV_HOSTNAME
volumes:
storage:
there are issues in starting up the project. Is there any specific thing that I need to adjust in here?
@zaifastafa please say what the issues are, and maybe somebody can help you.
It would be great if somebody who uses this would turn it into a ddev add-on.
When this file is added and I do ddev restart, the project starts fine but when opening the project it gives 503 ddev error.
A 503 normally means you have the wrong docroot or that the docroot has no index.php in it. ddev logs
may help you understand the 503.
Please do a standard trivial working project, maybe Drupal9 quickstart or something, and add this, and see if you still have the problem.
Hello,
I've implemented a full DDEV MinIO addon here. It exposes 9000 only locally, and gets a random port for localhost.
https://github.com/oblakstudio/ddev-minio
Fully tested and it works
FWIW, I have been using @seebeen's ddev-minio and it is working great.
@rfay can we move the ddev-minio to the official namespace?
Sure, please open an issue in ddev-minio. I'm in Chile, it may be a while but we'll do it.