4 Commits

Author SHA1 Message Date
clover d215e87278 fix horrendous mistake (#53) 2025-12-28 19:39:27 +00:00
lewisakura 849c44d858 docs: add note about GCHR 2025-04-07 11:09:01 +01:00
Fesaa a3d39f4d64 Fix log spam: move health endpoint before logger (#44)
Co-authored-by: lewisakura <lewi@lewisakura.moe>
2024-11-29 14:50:09 +00:00
Alexandre faa4c772f2 Remove deprecated version in docker compose file (#46) 2024-11-29 14:45:31 +00:00
3 changed files with 14 additions and 8 deletions
+7 -2
View File
@@ -9,7 +9,12 @@ Vencloud is Vencord's API for cloud settings sync!
We provide a Docker build, so you don't need anything installed besides Docker! We provide a Docker build, so you don't need anything installed besides Docker!
### Cloning the Repository ### Using Docker and GitHub Container Registry
We publish a built, stable image on [GHCR](https://ghcr.io/vencord/vencloud). Pull the image using `ghcr.io/vencord/vencloud`. Use the
`docker-compose.yml` file we have in this repository as a reference for further setup!
### From Git
First of all, you'll have to clone the source code to a convenient location: First of all, you'll have to clone the source code to a convenient location:
```sh ```sh
@@ -43,7 +48,7 @@ Please note that only the docker setup is supported by us.
The native instructions are only provided for advanced users and we can't provide support if you get stuck! The native instructions are only provided for advanced users and we can't provide support if you get stuck!
When in doubt, please use the docker setup. When in doubt, please use the docker setup.
Alongisde the Vencloud setup, you will also have to setup Redis. This will not be covered here, please refer to the Redis documentation. Alongside the Vencloud setup, you will also have to setup Redis. This will not be covered here, please refer to the Redis documentation.
1. Install the [Go programming language](https://go.dev/dl/) 1. Install the [Go programming language](https://go.dev/dl/)
2. Build the code: `go build -o backend` 2. Build the code: `go build -o backend`
-2
View File
@@ -1,5 +1,3 @@
version: "3.1"
services: services:
redis: redis:
image: redis:alpine image: redis:alpine
+7 -4
View File
@@ -109,8 +109,8 @@ func main() {
} }
app := fiber.New(fiber.Config{ app := fiber.New(fiber.Config{
ProxyHeader: os.Getenv("PROXY_HEADER"), ProxyHeader: os.Getenv("PROXY_HEADER"),
}) })
g.RDB = redis.NewClient(&redis.Options{ g.RDB = redis.NewClient(&redis.Options{
Addr: g.REDIS_URI, Addr: g.REDIS_URI,
@@ -144,6 +144,11 @@ func main() {
ExposeHeaders: "ETag", ExposeHeaders: "ETag",
AllowOrigins: "https://discord.com,https://ptb.discord.com,https://canary.discord.com,https://discordapp.com,https://ptb.discordapp.com,https://canary.discordapp.com", AllowOrigins: "https://discord.com,https://ptb.discord.com,https://canary.discord.com,https://discordapp.com,https://ptb.discordapp.com,https://canary.discordapp.com",
})) }))
// Add the docker health endpoint before the logger middleware, such that
// it doesn't spam the logs full with it
app.Get("/v1", routes.GET)
app.Use(logger.New()) app.Use(logger.New())
// #region settings // #region settings
@@ -164,8 +169,6 @@ func main() {
app.Delete("/v1", requireAuth, routes.DELETE) app.Delete("/v1", requireAuth, routes.DELETE)
// #endregion // #endregion
app.Get("/v1", routes.GET)
app.Get("/", func(c *fiber.Ctx) error { app.Get("/", func(c *fiber.Ctx) error {
return c.Redirect(g.ROOT_REDIRECT, 303) return c.Redirect(g.ROOT_REDIRECT, 303)
}) })