From fd5e411c1d068c0de448c3aa7a602d11793019ad Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 8 Sep 2021 09:17:40 +0100 Subject: [PATCH] Auto-create S3 buckets for minio. --- .gitignore | 1 + README.md | 2 +- docker-compose.yml | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3f8be5f..7da3c65 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ data +data.old .env \ No newline at end of file diff --git a/README.md b/README.md index b0d9c03..8a3d7df 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -This is still a work-in-progress and some things may not work, notably Autumn does not auto-create S3 buckets yet. +This is still a work-in-progress and some things may not work but for the most part everything has been tested without issue! ## Quick Start diff --git a/docker-compose.yml b/docker-compose.yml index 95c80f7..0629f8d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,6 +38,23 @@ services: - "10000:9000" restart: always + # Create buckets for minio. + createbuckets: + image: minio/mc + depends_on: + - minio + env_file: .env + entrypoint: > + /bin/sh -c " + /usr/bin/mc alias set minio http://minio:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD; + /usr/bin/mc mb minio/attachments; + /usr/bin/mc mb minio/avatars; + /usr/bin/mc mb minio/backgrounds; + /usr/bin/mc mb minio/icons; + /usr/bin/mc mb minio/banners; + exit 0; + " + # REVOLT file hosting service (Autumn) autumn: image: revoltchat/autumn