Skip to content

Commit 1905e6f

Browse files
authored
Merge pull request #3 from linuxserver/readme-update
Important documentation update for setting DATABASE_URL with version 2.0.30 and later
2 parents fd97013 + 85706be commit 1905e6f

2 files changed

Lines changed: 28 additions & 16 deletions

File tree

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,19 @@ The architectures supported by this image are:
6767

6868
You have to replace the following values with your defaults:
6969

70-
- the database username "your_db_user"
71-
- the database password "your_db_pass"
72-
- the database schema name "your_db_name"
73-
- the database host or IP "your_db_host"
74-
- you might have to adapt port "3306" as well
70+
* the database username "your_db_user"
71+
* the database password "your_db_pass"
72+
* the database schema name "your_db_name"
73+
* the database host or IP "your_db_host"
74+
* the database character set "your_db_charset" (usually "utf8")
75+
* the database version "your_db_version"
76+
* run `SELECT VERSION();` in your MariaDB/MySQL database to get the version
77+
* example for [MariaDB](https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/configuration.html#mariadb) use "10.11.4-MariaDB-log"
78+
* example for [MySQL](https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/configuration.html#mysql) use "8.0.32"
79+
* you might have to adapt port "3306" as well
7580

7681
```env
77-
DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name
82+
DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version
7883
````
7984
8085
### Create your first user
@@ -104,7 +109,7 @@ services:
104109
- PUID=1000
105110
- PGID=1000
106111
- TZ=Etc/UTC
107-
- DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name
112+
- DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version
108113
volumes:
109114
- /path/to/appdata/config:/config
110115
ports:
@@ -141,7 +146,7 @@ docker run -d \
141146
-e PUID=1000 \
142147
-e PGID=1000 \
143148
-e TZ=Etc/UTC \
144-
-e DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name \
149+
-e DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version \
145150
-p 80:80 \
146151
-p 443:443 \
147152
-v /path/to/appdata/config:/config \
@@ -177,7 +182,7 @@ Container images are configured using parameters passed at runtime (such as thos
177182
| `-e PUID=1000` | for UserID - see below for explanation |
178183
| `-e PGID=1000` | for GroupID - see below for explanation |
179184
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
180-
| `-e DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name` | Configure your database connection |
185+
| `-e DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version` | Configure your database connection, see Application Setup instructions. |
181186
| `-v /config` | Configuration files. |
182187

183188
## Environment variables from files (Docker secrets)
@@ -289,4 +294,5 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
289294

290295
## Versions
291296

297+
* **21.08.23:** - Important documentation update for setting `DATABASE_URL` with version 2.0.30 and later.
292298
* **09.08.23:** - Initial Release.

readme-vars.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ common_param_env_vars_enabled: true
3131
param_container_name: "{{ project_name }}"
3232
param_usage_include_env: true
3333
param_env_vars:
34-
- { env_var: "DATABASE_URL", env_value: "mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name", desc: "Configure your database connection"}
34+
- { env_var: "DATABASE_URL", env_value: "mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version", desc: "Configure your database connection, see Application Setup instructions."}
3535
param_usage_include_vols: true
3636
param_volumes:
3737
- { vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Configuration files.", name: "Appdata" }
@@ -52,14 +52,19 @@ app_setup_block: |
5252
5353
You have to replace the following values with your defaults:
5454
55-
- the database username "your_db_user"
56-
- the database password "your_db_pass"
57-
- the database schema name "your_db_name"
58-
- the database host or IP "your_db_host"
59-
- you might have to adapt port "3306" as well
55+
* the database username "your_db_user"
56+
* the database password "your_db_pass"
57+
* the database schema name "your_db_name"
58+
* the database host or IP "your_db_host"
59+
* the database character set "your_db_charset" (usually "utf8")
60+
* the database version "your_db_version"
61+
* run `SELECT VERSION();` in your MariaDB/MySQL database to get the version
62+
* example for [MariaDB](https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/configuration.html#mariadb) use "10.11.4-MariaDB-log"
63+
* example for [MySQL](https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/configuration.html#mysql) use "8.0.32"
64+
* you might have to adapt port "3306" as well
6065
6166
```env
62-
DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name
67+
DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version
6368
````
6469
6570
### Create your first user
@@ -112,4 +117,5 @@ external_application_unraid_block: "We recommend using our [MariaDB](https://git
112117

113118
# changelog
114119
changelogs:
120+
- { date: "21.08.23:", desc: "Important documentation update for setting `DATABASE_URL` with version 2.0.30 and later." }
115121
- { date: "09.08.23:", desc: "Initial Release." }

0 commit comments

Comments
 (0)