From 286f92a94ca4a0b7da5f81fae13459e5a6a253db Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Wed, 31 Jul 2024 14:51:17 -0300 Subject: [PATCH] Add wip vencloud config, awaiting prebuild images --- vencloud/.env.example | 42 +++++++++++++++++++++++++++++++++++++ vencloud/docker-compose.yml | 25 ++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 vencloud/.env.example create mode 100644 vencloud/docker-compose.yml diff --git a/vencloud/.env.example b/vencloud/.env.example new file mode 100644 index 0000000..b9ca741 --- /dev/null +++ b/vencloud/.env.example @@ -0,0 +1,42 @@ +# Port and host to bind the server to. If running in Docker, there's no point changing them. +PORT=8080 +HOST=0.0.0.0 +# The URI used for connecting to redis +REDIS_URI=redis:6379 + +# URL that the root of the API will redirect to. +# The site specified here HAS TO link to the source code (including your modificiations, if applicable), +# to comply with the AGPL-3.0 license terms. +# If your instance is public, you should also provide a Privacy Policy for your users. +ROOT_REDIRECT=https://github.com/Vencord/Vencloud + +# Your Discord application data +# 1. Create application at https://discord.com/developers/applications +# 2. Navigate to the OAuth2 tab +# 3. Under "Client information", you'll find the client id and secret. You'll have to press "Reset Secret" to get the secret +# 4. Under "Redirects", click "Add Redirect" and add your domain with `/v1/oauth/callback` appended to it +DISCORD_CLIENT_ID= +DISCORD_CLIENT_SECRET= +DISCORD_REDIRECT_URI=https://example.com/v1/oauth/callback + +# This is prepended to the user ID before hashing to generate the key used to store their api secret. +# Can be generated via `openssl rand -hex 64`. At least 32 bytes should be used +PEPPER_SECRETS= +# This is prepended to the user ID before hashing to generate the key used to store their settings. +# Can be generated with `openssl rand -hex 64`. At least 32 bytes should be used +PEPPER_SETTINGS= + +# The maximum settings backup size in bytes. Default is 32MB. +SIZE_LIMIT=32000000 + +# List of Discord user IDs allowed to use the service, separated by commas. +# If empty, all users are allowed +ALLOWED_USERS= + +# Whether to enable and expose analytics at /metrics +PROMETHEUS=false + +# The header containing the connecting user's ip when running behind a reverse proxy, +# e.g. X-Forwarded-For or CF-Connecting-IP. Used for anti abuse purposes. +# If not using a reverse proxy, leave this empty +PROXY_HEADER=X-Forwarded-For diff --git a/vencloud/docker-compose.yml b/vencloud/docker-compose.yml new file mode 100644 index 0000000..8168384 --- /dev/null +++ b/vencloud/docker-compose.yml @@ -0,0 +1,25 @@ +version: "3.1" + +services: + redis: + image: redis:alpine + restart: always + volumes: + - /docker/appdata/vencloud/redis:/data + environment: + REDIS_ARGS: --save 300 1 60 10 + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 5s + timeout: 5s + retries: 5 + + backend: + image: vencord/backend + build: . + restart: always + env_file: + - .env + depends_on: + redis: + condition: service_healthy