Skip to content

Commit 79cb230

Browse files
alexjustesengitbook-bot
authored andcommitted
GITBOOK-58: change request with no subject merged in GitBook
1 parent 024d5d5 commit 79cb230

File tree

4 files changed

+57
-13
lines changed

4 files changed

+57
-13
lines changed

SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* [Using Synology](getting-started/installation/installation-1.md)
1212
* [Using Unraid](getting-started/installation/installation-2.md)
1313
* [Kubernetes](getting-started/installation/kubernetes.md)
14-
* [Database](getting-started/database.md)
14+
* [Database Drivers](getting-started/database-drivers.md)
1515
* [Environment Variables](getting-started/environment-variables.md)
1616

1717
## 🔑 Security

faqs.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@ description: A running list of frequently ask questions and their answers.
1010

1111
<summary>Using SQLite</summary>
1212

13-
SQLite is supported by Laravel as a database driver but it is no longer the recommended driver for this project. To setup SQLite as your database driver of choice use the directions below.
13+
SQLite is supported by Laravel as a database driver but it is not the default or recommended driver for this project. To setup SQLite as your database driver of choice use the directions below.
1414

15-
`v0.11.22` dropped SQLite support, to reconnect your existing database you can start on Step 3.
16-
17-
1. Create a volume called `speedtest-tracker` and attach it to the container.
18-
2. Create a file called `database.sqlite`, you can do this by running `touch database.sqlite` in the mounted volume or create it in the mounted directory.
19-
3. Update your environment variables to only include the following for under the `DB_` prefix: `DB_CONNECTION=sqlite` and `DB_DATABASE=/config/database.sqlite`.
20-
4. Restart the container.
15+
Directions for using SQLite can now be found on the [Database Drivers](getting-started/database-drivers.md) page.
2116

2217
</details>
2318

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Database Drivers
2+
3+
Since Speedtest Tracker is built on the Laravel Framework any of the framework's supported database [drivers](https://laravel.com/docs/10.x/database#configuration) are also supported.
4+
5+
MySQL/MariaDB ships as the default driver but you can also use SQLite and Postgres. While SQL Server is supported by Laravel it hasn't been tested with Speedtest Tracker so no support will be provided for that driver.
6+
7+
***
8+
9+
### Driver Options
10+
11+
#### MySQL/MariaDB (Default, recommended)
12+
13+
MariaDB ships as the default database that's included in the `docker-compose.yml` configuration, it's functionally the same as MySQL just an open-source earlier fork.
14+
15+
| Environment Variable | Value |
16+
| -------------------- | -------------------------------------------------------------------------------------------------------------- |
17+
| `DB_DRIVER` | <p><code>mysql</code> </p><p></p><p>The <code>mysql</code> driver can be used for both MySQL and MariaDB.</p> |
18+
| `DB_HOST` | The FQDN or address to the database instance. |
19+
| `DB_PORT` | `3306` is the default port but can depend on your setup. |
20+
| `DB_DATABASE` | Name of the database you'll connect to. |
21+
| `DB_USERNAME` | User that'll be used to connect to the database. |
22+
| `DB_PASSWORD` | Password for the user above. |
23+
24+
#### SQLite
25+
26+
SQLite is a good option for simple installs and only not recommended because I think separating your application and the database into separate services is a better idea.
27+
28+
To use SQLite follow the steps below to create your database file:&#x20;
29+
30+
1. Create a volume called `speedtest-tracker` or mount a directory to the container.
31+
2. Create a file called `database.sqlite`, you can do this by running `touch database.sqlite` in the mounted volume or create it in the mounted directory.
32+
3. Update your environment variables to only include the following environment variables in the table below.
33+
34+
| Environment Variable | Value |
35+
| -------------------- | --------------------------------------------------------------------------------- |
36+
| `DB_DRIVER` | `sqlite` |
37+
| `DB_DATABASE` | This should be the path to your SQLite database (i.e. `/config/database.sqlite`). |
38+
39+
#### Postgres
40+
41+
| Environment Variable | Value |
42+
| -------------------- | -------------------------------------------------------- |
43+
| `DB_DRIVER` | `pgsql` |
44+
| `DB_HOST` | The FQDN or address to the database instance. |
45+
| `DB_PORT` | `5432` is the default port but can depend on your setup. |
46+
| `DB_DATABASE` | Name of the database you'll connect to. |
47+
| `DB_USERNAME` | User that'll be used to connect to the database. |
48+
| `DB_PASSWORD` | Password for the user above. |
49+
50+
#### SQL Server
51+
52+
While supported by the framework it's drivers are not installed in the base image, if you want to use SQL Server you should extend the base image.
53+
54+
Laravel docs: [https://laravel.com/docs/10.x/database#mssql-configuration](https://laravel.com/docs/10.x/database#mssql-configuration)

getting-started/database.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)