Closed douggreen closed 11 months ago
When you're doing a hook that doesn't run in the default web
container, you have to specify the service. So
hooks:
post-start:
- exec: mc mb minio/files
service: minio
See https://ddev.readthedocs.io/en/latest/users/configuration/hooks/#supported-tasks for examples that show doing something in the db container.
Is there maybe an order issue.
service "minio" has neither an image nor a build context specified: invalid compose project
I have in my config.yaml:
hooks:
post-start:
- exec: mc mb minio/files
service: minio
Yet if I run
ddev service enable minio
Service minio already enabled, see docker-compose.minio.yaml
Closing this, @rfay's suggestion works on my bare bones setup (but not on my actual project's setup), which suggest that something is wrong with my project ???
Doug, I'll check on our end as well.
If you're using this add-on, then there's a service named minio. Take a look at your docker-compose.minio.yaml.
I don't think you want to use ddev service enable
though, it's kind of been left behind. If you did a ddev get oblakstudio/ddev-minio
then you'd have a minio service.
Where can I add a post start command to create a minio bucket. This runs in the webserver container and fails.
Before I upgraded to the latest minio, I think I had t working in .ddev/docker-compose.minio-z.yaml services. I'm not sure where I got this code. I don't know this uses /bin/sh. I don't think I need the "anonymous" line, but it was something I tried while trying to figure out https://github.com/oblakstudio/ddev-minio/issues/18. It is named -z to so that it runs last; again, I'm not sure that is necessary, but I originally named it -custom and it seems to work when I renamed it -z.