From e714b3650029eb3b052c488970e560314d349b0d Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 14 Jun 2021 20:23:59 +0100 Subject: [PATCH] Initial commit --- .env.example | 97 ++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 2 + README.md | 15 +++++++ docker-compose.yml | 55 ++++++++++++++++++++++++++ 4 files changed, 169 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 README.md create mode 100644 docker-compose.yml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..e2f8cb6 --- /dev/null +++ b/.env.example @@ -0,0 +1,97 @@ +# URL to where the REVOLT app is publicly accessible +REVOLT_APP_URL=http://local.revolt.chat:5000 + +# URL to where the API is publicly accessible +REVOLT_PUBLIC_URL=http://local.revolt.chat:8000 + +# URL to where the WebSocket server is publicly accessible +REVOLT_EXTERNAL_WS_URL=ws://local.revolt.chat:9000 + +# URL to where Autumn is publicly available +AUTUMN_PUBLIC_URL=http://local.revolt.chat:3000 + +# URL to where January is publicly available +JANUARY_PUBLIC_URL=http://local.revolt.chat:7000 + +# URL to where Vortex is publicly available +# VOSO_PUBLIC_URL=https://voso.revolt.chat + + +## +## hCaptcha Settings +## + +# If you are sure that you don't want to use hCaptcha, set to 1. +REVOLT_UNSAFE_NO_CAPTCHA=0 + +# hCaptcha API key +# REVOLT_HCAPTCHA_KEY=0x0000000000000000000000000000000000000000 + +# hCaptcha site key +# REVOLT_HCAPTCHA_SITEKEY=10000000-ffff-ffff-ffff-000000000001 + + +## +## Email Settings +## + +# If you are sure that you don't want to use email verification, set to 1. +REVOLT_UNSAFE_NO_EMAIL=0 + +# SMTP host +# REVOLT_SMTP_HOST=smtp.example.com + +# SMTP username +# REVOLT_SMTP_USERNAME=noreply@example.com + +# SMTP password +# REVOLT_SMTP_PASSWORD=CHANGEME + +# SMTP From header +# REVOLT_SMTP_FROM="REVOLT " + + +## +## Application Settings +## + +# Whether to only allow users to sign up if they have an invite code +REVOLT_INVITE_ONLY=0 + +# Maximum number of people that can be in a group chat +REVOLT_MAX_GROUP_SIZE=150 + +# VAPID keys for push notifications +# Generate using this guide: https://gitlab.insrt.uk/revolt/delta/-/wikis/vapid +REVOLT_VAPID_PRIVATE_KEY= +REVOLT_VAPID_PUBLIC_KEY= + + +## +## 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 (auto-filled if present above) +# AWS_ACCESS_KEY_ID=minioautumn + +# AWS Secret Key (auto-filled if present above) +# AWS_SECRET_ACCESS_KEY=minioautumn + + +## +## Vortex configuration +## + +# VOSO_MANAGE_TOKEN=CHANGEME diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3f8be5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +data +.env \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..9a988d2 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +This is still a work-in-progress and some things may not work, notably Autumn does not auto-create S3 buckets yet and the app points to api.revolt.chat by default. + +## Usage + +Copy the `.env` file and edit according to your needs. + +```bash +cp .env.example .env +``` + +Then bring up REVOLT: + +```bash +docker-compose up -d +``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cb67911 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,55 @@ +version: '3.8' + +services: + # MongoDB database + database: + image: mongo + restart: always + volumes: + - ./data/db:/data/db + + # REVOLT API server (Delta) + api: + image: revoltchat/server + env_file: .env + environment: + - REVOLT_MONGO_URI=mongodb://database + ports: + - "8000:8000" + - "9000:9000" + restart: always + + # REVOLT Web App + web: + image: revoltchat/client + ports: + - "5000:5000" + restart: always + + # S3-compatible storage server + minio: + image: minio/minio + command: server /data + env_file: .env + volumes: + - ./data:/data + ports: + - "10000:9000" + restart: always + + # REVOLT file hosting service (Autumn) + autumn: + image: revoltchat/autumn + env_file: .env + environment: + - AUTUMN_MONGO_URI=mongodb://database + ports: + - "3000:3000" + restart: always + + # REVOLT metadata and image proxy (January) + january: + image: revoltchat/january + ports: + - "7000:3000" + restart: always