Skip to content

Commit

Permalink
Merge pull request #3 from linuxserver/readme-update
Browse files Browse the repository at this point in the history
Important documentation update for setting DATABASE_URL with version 2.0.30 and later
  • Loading branch information
nemchik committed Aug 21, 2023
2 parents fd97013 + 85706be commit 1905e6f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,19 @@ The architectures supported by this image are:

You have to replace the following values with your defaults:

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

```env
DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name
DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version
````

### Create your first user
Expand Down Expand Up @@ -104,7 +109,7 @@ services:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name
- DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version
volumes:
- /path/to/appdata/config:/config
ports:
Expand Down Expand Up @@ -141,7 +146,7 @@ docker run -d \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name \
-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 \
-p 80:80 \
-p 443:443 \
-v /path/to/appdata/config:/config \
Expand Down Expand Up @@ -177,7 +182,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name` | Configure your database connection |
| `-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. |
| `-v /config` | Configuration files. |

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

## Versions

* **21.08.23:** - Important documentation update for setting `DATABASE_URL` with version 2.0.30 and later.
* **09.08.23:** - Initial Release.
20 changes: 13 additions & 7 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_env: true
param_env_vars:
- { 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"}
- { 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."}
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Configuration files.", name: "Appdata" }
Expand All @@ -52,14 +52,19 @@ app_setup_block: |
You have to replace the following values with your defaults:
- the database username "your_db_user"
- the database password "your_db_pass"
- the database schema name "your_db_name"
- the database host or IP "your_db_host"
- you might have to adapt port "3306" as well
* the database username "your_db_user"
* the database password "your_db_pass"
* the database schema name "your_db_name"
* the database host or IP "your_db_host"
* the database character set "your_db_charset" (usually "utf8")
* the database version "your_db_version"
* run `SELECT VERSION();` in your MariaDB/MySQL database to get the version
* example for [MariaDB](https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/configuration.html#mariadb) use "10.11.4-MariaDB-log"
* example for [MySQL](https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/configuration.html#mysql) use "8.0.32"
* you might have to adapt port "3306" as well
```env
DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name
DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version
````
### Create your first user
Expand Down Expand Up @@ -112,4 +117,5 @@ external_application_unraid_block: "We recommend using our [MariaDB](https://git

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

0 comments on commit 1905e6f

Please sign in to comment.