Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d215e87278 | |||
| 849c44d858 | |||
| a3d39f4d64 | |||
| faa4c772f2 | |||
| 075bc3faaf | |||
| 7bf5f9cd6f |
@@ -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`
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
version: "3.1"
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
|
|||||||
@@ -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)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user