Skip to content

Commit 60dc22e

Browse files
committed
update config docs
1 parent fae975f commit 60dc22e

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

docs/configuration/config/environment-variables.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
description: How to configure Lavalink
33
---
44

5-
# Configuration
5+
# Environment Variables
66

7-
The server configuration is done in `application.yml`. You can find an example below.
7+
You can also use environment variables to configure the server. The environment variables are named the same as the keys in the `application.yml` file, but in uppercase and with `.` replaced with `_`. For example, `server.port` becomes `SERVER_PORT`.
8+
For arrays, the index is appended to the key, starting at 0. For example, `LAVALINK_PLUGINS_0_DEPENDENCY` refers to the `dependency` key of the first plugin.
9+
10+
You can also use a combination of both. Environment variables take precedence over the `application.yml` file.
811

912
## Example application.yml
1013

@@ -17,14 +20,8 @@ The server configuration is done in `application.yml`. You can find an example b
1720

1821
</details>
1922

20-
Alternatively, you can also use environment variables to configure the server. The environment variables are named the same as the keys in the `application.yml` file, but in uppercase and with `.` replaced with `_`. For example, `server.port` becomes `SERVER_PORT`.
21-
For arrays, the index is appended to the key, starting at 0. For example, `LAVALINK_PLUGINS_0_DEPENDENCY` refers to the `dependency` key of the first plugin.
22-
2323
## Example environment variables
2424

25-
<details markdown="1">
26-
<summary>environment variables</summary>
27-
2825
```env title="enviroment variables"
2926
SERVER_PORT
3027
SERVER_ADDRESS
@@ -88,6 +85,10 @@ LAVALINK_SERVER_HTTP_CONFIG_PROXY_PORT
8885
LAVALINK_SERVER_HTTP_CONFIG_PROXY_USER
8986
LAVALINK_SERVER_HTTP_CONFIG_PROXY_PASSWORD
9087
88+
LAVALINK_SERVER_TIMEOUTS_CONNECT_TIMEOUT_MS
89+
LAVALINK_SERVER_TIMEOUTS_CONNECTION_REQUEST_TIMEOUT_MS
90+
LAVALINK_SERVER_TIMEOUTS_SOCKET_TIMEOUT_MS
91+
9192
METRICS_PROMETHEUS_ENABLED
9293
METRICS_PROMETHEUS_ENDPOINT
9394
@@ -110,7 +111,3 @@ LOGGING_REQUEST_MAX_PAYLOAD_LENGTH
110111
LOGGING_LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE
111112
LOGGING_LOGBACK_ROLLINGPOLICY_MAX_HISTORY
112113
```
113-
114-
</details>
115-
116-
You can also use a combination of both. Environment variables take precedence over the `application.yml` file.
File renamed without changes.

docs/configuration/config/config-server.md renamed to docs/configuration/config/server.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: How to configure Lavalink with the Config Server
66

77
## Example Lavalink application.yml
88

9-
To configure Lavalink to pull it's configuration from a [Lavalink Config Server](https://github.com/lavalink-devs/Lavalink-Config-Server) you need to put the following in your `application.yml` file:
9+
To configure Lavalink to pull its configuration from a [Lavalink Config Server](https://github.com/lavalink-devs/Lavalink-Config-Server) you need to put the following in your `application.yml` file:
1010

1111
```yaml title="application.yml"
1212
--8<-- "LavalinkServer/application.yml.cloud-example"
@@ -18,7 +18,8 @@ Alternatively, this can also be done via environment variables:
1818
<summary>Environment Variables</summary>
1919

2020
```bash
21-
SPRING_APPLICATION_NAME
21+
SPRING_CLOUD_CONFIG_ENABLED
22+
SPRING_CLOUD_CONFIG_NAME
2223
SPRING_CLOUD_CONFIG_PROFILE
2324
SPRING_CLOUD_CONFIG_LABEL
2425
SPRING_CLOUD_CONFIG_FAIL_FAST
@@ -34,9 +35,9 @@ SPRING_CONFIG_IMPORT
3435

3536
To run the Lavalink Config Server, you can use the docker image located at [`ghcr.io/lavalink-devs/lavalink-config-server`](https://github.com/lavalink-devs/Lavalink-Config-Server/pkgs/container/lavalink-config-server)
3637

37-
### Example docker-compose.yml
38+
### Example compose.yml
3839

39-
```yaml
40+
```yaml title="compose.yml"
4041
services:
4142
lavalink-config-server:
4243
image: ghcr.io/lavalink-devs/lavalink-config-server:master
@@ -173,4 +174,4 @@ The config repository should have the following structure:
173174

174175
The `application.yml` file is the default configuration file.
175176
The `application-{profile}.yml` file is the configuration file for the specified profile and overrides the config entries in the default configuration file.
176-
The profile name can be set in the [`application.yml`](#example-applicationyml) file of the Lavalink server.
177+
The profile name can be set in the [`application.yml`](file.md#example-applicationyml) file of the Lavalink server.

docs/getting-started/docker.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Install [Docker](https://docs.docker.com/engine/install/) & [Docker Compose](htt
1515
| `Alpine` | Smaller image size, based on Alpine | 21 | 322 | 322 | `ghcr.io/lavalink-devs/lavalink:4-alpine` |
1616
| `Distroless` | Even smaller image size, based on Distroless | 21 | 65534 | 65534 | `ghcr.io/lavalink-devs/lavalink:4-distroless` |
1717

18-
Create a `docker-compose.yml` with the following content:
18+
Create a `compose.yml` with the following content:
1919

20-
```yaml title="docker-compose.yml"
20+
```yaml title="compose.yml"
2121
services:
2222
lavalink:
2323
# pin the image version to Lavalink v4 and use the alpine variant for a smaller image size
@@ -52,7 +52,7 @@ networks:
5252
name: lavalink
5353
```
5454
55-
Create an `application.yml` file in the same directory as the `docker-compose.yml` file. ([Example here](index.md#example-applicationyml)) or use environment variables ([Example here](index.md#example-environment-variables))
55+
Create an `application.yml` file in the same directory as the `compose.yml` file. ([Example here](../configuration/config/file.md#example-applicationyml)) or use environment variables ([Example here](../configuration/config/environment-variables.md#example-environment-variables))
5656

5757
Run `docker compose up -d`. See [Docker Compose Up](https://docs.docker.com/engine/reference/commandline/compose_up/)
5858

0 commit comments

Comments
 (0)