diff --git a/.env.example b/.env.example index 69adfac5..5fca0004 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,7 @@ # MongoDB URI MONGODB=mongodb://localhost +AUTUMN_MONGO_URI=mongodb://database +REDIS_URI=redis://localhost/ # URL to where the Revolt app is publicly accessible REVOLT_APP_URL=http://local.revolt.chat:5000 @@ -80,3 +82,26 @@ REVOLT_VAPID_PUBLIC_KEY=BGcvgR-i2z4IQ5Mw841vJvkLjt8wY-FjmWrw83jOLCY52qcGZS0OF7nf ## # VOSO_MANAGE_TOKEN=CHANGEME + + +## +## Autumn configuration +## + +# S3 Region +AUTUMN_S3_REGION=minio + +# S3 Endpoint +AUTUMN_S3_ENDPOINT=http://minio:9000 + +# MinIO Root User +MINIO_ROOT_USER=minioautumn + +# MinIO Root Password +MINIO_ROOT_PASSWORD=minioautumn + +# AWS Access Key ID +AWS_ACCESS_KEY_ID=minioautumn + +# AWS Secret Key +AWS_SECRET_ACCESS_KEY=minioautumn diff --git a/README.md b/README.md index 906ea690..a81488f4 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ If you want to run the API and event servers: ```bash # create environment file (will be deprecated in future) cp .env.example .env + # (optionally) copy the default configuration file cp crates/core/config/Revolt.toml Revolt.toml # configure as necessary... diff --git a/docker-compose.yml b/docker-compose.yml index c712d1e4..de56d7a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,8 +43,8 @@ services: env_file: .env entrypoint: > /bin/sh -c " - while ! curl -s --output /dev/null --connect-timeout 1 http://minio:9000; do echo 'Waiting minio...' && sleep 0.1; done; - /usr/bin/mc alias set minio http://minio:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD; + /usr/bin/mc config host add minio http://minio:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD; + while ! /usr/bin/mc ready minio; do echo 'Waiting minio...' && sleep 1; done; /usr/bin/mc mb minio/attachments; /usr/bin/mc mb minio/avatars; /usr/bin/mc mb minio/backgrounds; @@ -53,15 +53,13 @@ services: /usr/bin/mc mb minio/emojis; exit 0; " + # File server (autumn) autumn: image: ghcr.io/revoltchat/autumn:1.1.5 env_file: .env depends_on: - - database - createbuckets - environment: - - AUTUMN_MONGO_URI=mongodb://database ports: - "3000:3000" restart: always