You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration/config/environment-variables.md
+9-12Lines changed: 9 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,12 @@
2
2
description: How to configure Lavalink
3
3
---
4
4
5
-
# Configuration
5
+
# Environment Variables
6
6
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.
8
11
9
12
## Example application.yml
10
13
@@ -17,14 +20,8 @@ The server configuration is done in `application.yml`. You can find an example b
17
20
18
21
</details>
19
22
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.
Copy file name to clipboardExpand all lines: docs/configuration/config/server.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: How to configure Lavalink with the Config Server
6
6
7
7
## Example Lavalink application.yml
8
8
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:
@@ -18,7 +18,8 @@ Alternatively, this can also be done via environment variables:
18
18
<summary>Environment Variables</summary>
19
19
20
20
```bash
21
-
SPRING_APPLICATION_NAME
21
+
SPRING_CLOUD_CONFIG_ENABLED
22
+
SPRING_CLOUD_CONFIG_NAME
22
23
SPRING_CLOUD_CONFIG_PROFILE
23
24
SPRING_CLOUD_CONFIG_LABEL
24
25
SPRING_CLOUD_CONFIG_FAIL_FAST
@@ -34,9 +35,9 @@ SPRING_CONFIG_IMPORT
34
35
35
36
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)
@@ -173,4 +174,4 @@ The config repository should have the following structure:
173
174
174
175
The `application.yml` file is the default configuration file.
175
176
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.
|`Alpine`| Smaller image size, based on Alpine | 21 | 322 | 322 |`ghcr.io/lavalink-devs/lavalink:4-alpine`|
16
16
|`Distroless`| Even smaller image size, based on Distroless | 21 | 65534 | 65534 |`ghcr.io/lavalink-devs/lavalink:4-distroless`|
17
17
18
-
Create a `docker-compose.yml` with the following content:
18
+
Create a `compose.yml` with the following content:
19
19
20
-
```yaml title="docker-compose.yml"
20
+
```yaml title="compose.yml"
21
21
services:
22
22
lavalink:
23
23
# pin the image version to Lavalink v4 and use the alpine variant for a smaller image size
@@ -52,7 +52,7 @@ networks:
52
52
name: lavalink
53
53
```
54
54
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))
56
56
57
57
Run `docker compose up -d`. See [Docker Compose Up](https://docs.docker.com/engine/reference/commandline/compose_up/)
0 commit comments