Skip to content

Commit 063b697

Browse files
authored
Merge pull request alexjustesen#46 from svenvg93/env
Add Examples for environment variables & Tailscale Config
2 parents d332417 + e06ad90 commit 063b697

File tree

5 files changed

+85
-11
lines changed

5 files changed

+85
-11
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* [Proxies](other/proxies/README.md)
4040
* [Cloudflare Tunnel (Zero Trust)](other/proxies/cloudflare-tunnel-zero-trust.md)
4141
* [Traefik](other/proxies/traefik.md)
42+
* [Tailscale](other/proxies/tailscale.md)
4243
* [Caching](other/caching.md)
4344
* [Commands](other/commands.md)
4445
* [Data Dictionary](other/data-dictionary.md)

getting-started/environment-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ description: >-
88

99
### Application
1010

11-
<table><thead><tr><th width="233">Name</th><th>Description</th></tr></thead><tbody><tr><td><code>PUID</code><br><br>(required)</td><td>Used to set the user the container should run as.<br><br>- Default:<code>1000</code></td></tr><tr><td><code>PGID</code><br><br>(required)</td><td>Used to set the group the container should run as.<br><br>- Default:<code>1000</code></td></tr><tr><td><code>APP_NAME</code></td><td>Used to define the application's name in the dashboard and in notifications.<br></td></tr><tr><td><code>APP_KEY</code><br><br>(required)</td><td><p>Key used to encrypt and decrypt data.</p><p>You can generate a key at <a href="https://speedtest-tracker.dev">https://speedtest-tracker.dev</a>.</p></td></tr><tr><td><code>APP_URL</code></td><td>URL used for links in emails and notifications.</td></tr><tr><td><code>ASSET_URL</code></td><td>URL used for assets, needed when using a reverse proxy.</td></tr><tr><td><code>APP_TIMEZONE</code></td><td>Application timezone should be set if your database does not use UTC as it's default timezone.</td></tr><tr><td><code>CHART_DATETIME</code><br><code>_FORMAT</code></td><td>Set the formatting of timestamps in charts.<br><br>Formatting: <a href="https://www.php.net/manual/en/datetime.format.php">https://www.php.net/manual/en/datetime.format.php</a></td></tr><tr><td><code>DATETIME_FORMAT</code></td><td>Set the formatting of timestamps in tables and notifications.<br><br>Formatting: <a href="https://www.php.net/manual/en/datetime.format.php">https://www.php.net/manual/en/datetime.format.php</a></td></tr><tr><td><code>DISPLAY_TIMEZONE</code></td><td>Display timestamps in your local time.</td></tr><tr><td><code>CONTENT_WIDTH</code></td><td>Width of the content section of each page. Can be set to any value found in the Filament <a href="https://filamentphp.com/docs/3.x/panels/configuration#customizing-the-maximum-content-width">docs</a>.<br><br>- Default:<code>7xl</code></td></tr><tr><td><code>PUBLIC_DASHBOARD</code></td><td>Enables the public dashboard for guest (unauthenticated) users.<br><br>- Default:<code>false</code></td></tr><tr><td><code>DASHBOARD_POLLING</code></td><td>Frequency charts and stats refresh on the dashboard. Can be represented using a string in seconds or<code>false</code>to disable.<br><br>- Default:<code>60s</code></td></tr><tr><td><code>NOTIFICATION</code><br><code>_POLLING</code></td><td>Frequency database notifications are polled. Can be represented using a string in seconds or<code>false</code>to disable.<br><br>- Default:<code>60s</code></td></tr><tr><td><code>RESULTS_POLLING</code></td><td>Frequency data refreshes in the results table. Can be represented using a string in seconds or<code>false</code>to disable.<br><br>- Default:<code>false</code></td></tr></tbody></table>
11+
<table><thead><tr><th width="218">Name</th><th width="103" data-type="checkbox">Required</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>PUID</code></td><td>true</td><td>Used to set the user the container should run as.</td><td><code>1000</code></td></tr><tr><td><code>PGID</code></td><td>true</td><td>Used to set the group the container should run as.</td><td><code>1000</code></td></tr><tr><td><code>APP_NAME</code></td><td>false</td><td>Used to define the application's name in the dashboard and in notifications.<br></td><td></td></tr><tr><td><code>APP_KEY</code></td><td>true</td><td><p>Key used to encrypt and decrypt data.</p><p>You can generate a key at <a href="https://speedtest-tracker.dev">https://speedtest-tracker.dev</a>.</p></td><td><code>base64:ZoOYTjS+LBwFtud8SArwhiw8V4Qi9J+MPiT7z8XjfMo=</code><br>(DONT USE THIS EXAMPLE)</td></tr><tr><td><code>APP_URL</code></td><td>false</td><td>URL used for links in emails and notifications.</td><td><code>https://speedtest.example.com</code></td></tr><tr><td><code>ASSET_URL</code></td><td>false</td><td>URL used for assets, needed when using a reverse proxy.</td><td><code>https://speedtest.example.com</code></td></tr><tr><td><code>APP_TIMEZONE</code></td><td>false</td><td>Application timezone should be set if your database does not use UTC as it's default timezone.</td><td><code>Europe/London</code></td></tr><tr><td><code>CHART_DATETIME</code><br><code>_FORMAT</code></td><td>false</td><td>Set the formatting of timestamps in charts.<br><br>Formatting: <a href="https://www.php.net/manual/en/datetime.format.php">https://www.php.net/manual/en/datetime.format.php</a></td><td><code>j/m G:i</code><br>(18/10 20:06)</td></tr><tr><td><code>DATETIME_FORMAT</code></td><td>false</td><td>Set the formatting of timestamps in tables and notifications.<br><br>Formatting: <a href="https://www.php.net/manual/en/datetime.format.php">https://www.php.net/manual/en/datetime.format.php</a></td><td><code>j M Y, G:i:s</code><br>(18 Oct 2024, 20:06:01)</td></tr><tr><td><code>DISPLAY_TIMEZONE</code></td><td>false</td><td>Display timestamps in your local time.</td><td><code>Europe/London</code></td></tr><tr><td><code>CONTENT_WIDTH</code></td><td>false</td><td>Width of the content section of each page. Can be set to any value found in the Filament <a href="https://filamentphp.com/docs/3.x/panels/configuration#customizing-the-maximum-content-width">docs</a>.<br><br>- Default:<code>7xl</code></td><td></td></tr><tr><td><code>PUBLIC_DASHBOARD</code></td><td>false</td><td>Enables the public dashboard for guest (unauthenticated) users.<br><br>- Default:<code>false</code></td><td></td></tr><tr><td><code>DASHBOARD_POLLING</code></td><td>false</td><td>Frequency charts and stats refresh on the dashboard. Can be represented using a string in seconds or<code>false</code>to disable.<br><br>- Default:<code>60s</code></td><td></td></tr><tr><td><code>NOTIFICATION</code><br><code>_POLLING</code></td><td>false</td><td>Frequency database notifications are polled. Can be represented using a string in seconds or<code>false</code>to disable.<br><br>- Default:<code>60s</code></td><td></td></tr><tr><td><code>RESULTS_POLLING</code></td><td>false</td><td>Frequency data refreshes in the results table. Can be represented using a string in seconds or<code>false</code>to disable.<br><br>- Default:<code>false</code></td><td></td></tr></tbody></table>
1212

1313
### Speedtest
1414

15-
<table><thead><tr><th width="226">Name</th><th>Description</th></tr></thead><tbody><tr><td><code>SPEEDTEST</code><br><code>_PING_URL</code></td><td>IP address or URL used to check for an internet connection prior to running a test.</td></tr><tr><td><code>SPEEDTEST</code><br><code>_SCHEDULE</code></td><td>Cron expression used to run speedtests on a scheduled basis. https://crontab.guru/ is a helpful tool.</td></tr><tr><td><code>SPEEDTEST</code><br><code>_SERVERS</code></td><td>Comma separated list of server IDs to randomly use for speedtests, use this page to find the best servers for your ISP/location https://c.speedtest.net/speedtest-servers-static.php.</td></tr><tr><td><code>PRUNE_RESULTS</code><br><code>_OLDER_THAN</code></td><td>Set the value to greated than zero to prune stored results. This value should be represented in days, e.g. <code>7</code> will purge all results over 7 days old.</td></tr></tbody></table>
15+
<table><thead><tr><th width="221">Name</th><th data-type="checkbox">Required</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>SPEEDTEST</code><br><code>_PING_URL</code></td><td>false</td><td>IP address or URL used to check for an internet connection prior to running a test.</td><td><code>1.1.1.1</code></td></tr><tr><td><code>SPEEDTEST</code><br><code>_SCHEDULE</code></td><td>false</td><td>Cron expression used to run speedtests on a scheduled basis. https://crontab.guru/ is a helpful tool.</td><td><code>6 */2 * * *</code><br>(<em>At minute 6 past every 2nd hour)</em></td></tr><tr><td><code>SPEEDTEST</code><br><code>_SERVERS</code></td><td>false</td><td>Comma separated list of server IDs to randomly use for speedtests, use this page to find the best servers for your ISP/location https://c.speedtest.net/speedtest-servers-static.php.</td><td><code>52365</code> or <code>36998,52365</code></td></tr><tr><td><code>PRUNE_RESULTS</code><br><code>_OLDER_THAN</code></td><td>false</td><td>Set the value to greated than zero to prune stored results. This value should be represented in days, e.g. <code>7</code> will purge all results over 7 days old.</td><td><code>7</code></td></tr></tbody></table>

other/proxies/cloudflare-tunnel-zero-trust.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* For the tunnel you want to add the Speedtest Tracker to. Click on **Edit**
99
* Go to **Public Hostname**
1010
* Click on **Add a public hostname**
11-
* Fill in the fields the following field&#x20;
11+
* Fill in the fields the following field
1212
* **Subdomain:** The subdomain you want to access the Speedtest Tracker on.
1313
* **Domain:** The domain you want to access the Speedtest Tracker on.
1414
* **Type:** Connection type to the Speedtest Tracker (http/https)
@@ -21,8 +21,6 @@ When using the container\_name Cloudflare Tunnel and Speedtest Tracker need to b
2121

2222
<figure><img src="../../.gitbook/assets/cf-tunnel.png" alt=""><figcaption></figcaption></figure>
2323

24-
25-
2624
### Docker Configuration
2725

2826
Docker-Compose:
@@ -34,12 +32,16 @@ services:
3432
environment:
3533
- PUID=1000
3634
- PGID=1000
37-
- DB_CONNECTION=sqlite
3835
- APP_KEY=
39-
- ASSET_URL=
36+
- DB_CONNECTION=sqlite
4037
- SPEEDTEST_SCHEDULE=
4138
- SPEEDTEST_SERVERS=
39+
- PRUNE_RESULTS_OLDER_THAN=
40+
- CHART_DATETIME_FORMAT=
41+
- DATETIME_FORMAT=
42+
- APP_TIMEZONE=
4243
- APP_URL=speedtest.yourdomain.com # Change this to your domain name
44+
- ASSET_URL=speedtest.yourdomain.com # Change this to your domain name
4345
volumes:
4446
- /path/to/data:/config
4547
- /path/to-custom-ssl-keys:/config/keys
@@ -48,7 +50,7 @@ services:
4850
```
4951
5052
{% hint style="info" %}
51-
Depending on your Cloudflare Tunnel configuration, you need to make use the Speedtest Tracker and Cloudflare Tunnel are on the same docker network.
53+
Depending on your Cloudflare Tunnel configuration, you need to make sure the Speedtest Tracker and Cloudflare Tunnel are on the same docker network.
5254
{% endhint %}
5355
5456
<table><thead><tr><th width="291">Added compose part</th><th>Description</th></tr></thead><tbody><tr><td><code>APP_URL</code></td><td>URL you want to access the WebGui on.</td></tr><tr><td><code>ASSET_URL</code></td><td>URL used for loading all the needed assets. Need to be the same as the <code>APP_URL</code>.</td></tr></tbody></table>

other/proxies/tailscale.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Tailscale
2+
3+
[Tailscale](https://tailscale.com) Mesh VPN service can be used as an sidecar container to access the Speedtest Tracker within your Tailnet on its own MagicDNS name.&#x20;
4+
5+
## Tailscale Auth key&#x20;
6+
7+
Generate an auth key for tailscale so the docker container can access your tailnet.
8+
9+
1. Open the [**Keys**](https://login.tailscale.com/admin/settings/keys) page of the admin console.
10+
2. Select **Generate auth key**.
11+
3. Fill out the form fields to specify characteristics about the auth key, such as the description, whether its reusable, when it expires, and device settings.
12+
4. Select **Generate key**.
13+
14+
Save this Auth Key. We will need this later on.
15+
16+
## Docker Configuration
17+
18+
Docker-Compose:
19+
20+
```yaml
21+
services:
22+
tailscale-speedtest:
23+
image: tailscale/tailscale
24+
container_name: tailscale_speedtest-tracker
25+
hostname: speedtest
26+
environment:
27+
- TS_AUTHKEY=
28+
- TS_STATE_DIR=/var/lib/tailscale
29+
- TS_USERSPACE=false
30+
volumes:
31+
- ./tailscale-traefik/state:/var/lib/tailscale
32+
- /dev/net/tun:/dev/net/tun
33+
cap_add:
34+
- net_admin
35+
- sys_module
36+
restart: unless-stopped
37+
38+
speedtest-tracker:
39+
container_name: speedtest-tracker-tailscale
40+
depends_on:
41+
- tailscale-speedtest
42+
network_mode: service:tailscale-speedtest
43+
environment:
44+
- PUID=1000
45+
- PGID=1000
46+
- APP_KEY=
47+
- DB_CONNECTION=sqlite
48+
- SPEEDTEST_SCHEDULE=
49+
- SPEEDTEST_SERVERS=
50+
- PRUNE_RESULTS_OLDER_THAN=
51+
- CHART_DATETIME_FORMAT=
52+
- DATETIME_FORMAT=
53+
- APP_TIMEZONE=
54+
- APP_URL=speedtest.yourtailnet.ts.net # Change this to your MagicDNS name
55+
- ASSET_URL=speedtest.yourtailnet.ts.net # Change this to your MagicDNS name
56+
volumes:
57+
- /path/to/data:/config
58+
- /path/to-custom-ssl-keys:/config/keys
59+
image: lscr.io/linuxserver/speedtest-tracker:latest
60+
restart: unless-stopped
61+
```
62+
63+
| Added compose part | Description |
64+
| ------------------ | --------------------------------------------------------------------------------------- |
65+
| `APP_URL` | URL you want to access the WebGui on. This will need to be the Tailscale Magic DNS name |
66+
| `ASSET_URL` | URL used for loading all the needed assets. Need to be the same as the `APP_URL`. |
67+
| `TS_AUTHKEY` | Auth key for Tailscale |

other/proxies/traefik.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ services:
1111
environment:
1212
- PUID=1000
1313
- PGID=1000
14-
- DB_CONNECTION=sqlite
1514
- APP_KEY=
16-
- ASSET_URL=
15+
- DB_CONNECTION=sqlite
1716
- SPEEDTEST_SCHEDULE=
1817
- SPEEDTEST_SERVERS=
18+
- PRUNE_RESULTS_OLDER_THAN=
19+
- CHART_DATETIME_FORMAT=
20+
- DATETIME_FORMAT=
21+
- APP_TIMEZONE=
1922
- APP_URL=speedtest.yourdomain.com # Change this to your domain name
23+
- ASSET_URL=speedtest.yourdomain.com # Change this to your domain name
2024
volumes:
2125
- /path/to/data:/config
2226
- /path/to-custom-ssl-keys:/config/keys
@@ -32,7 +36,7 @@ services:
3236
```
3337
3438
{% hint style="info" %}
35-
Depending on your Traefik configuration, you need to make use the Speedtest Tracker and Traefik are on the same docker network.
39+
Depending on your Traefik configuration, you need to make sure the Speedtest Tracker and Traefik are on the same docker network.
3640
{% endhint %}
3741
3842
<table><thead><tr><th width="291">Added compose part</th><th>Description</th></tr></thead><tbody><tr><td><code>APP_URL</code></td><td>URL you want to access the WebGui on.</td></tr><tr><td><code>ASSET_URL</code></td><td>URL used for loading all the needed assets. Need to be the same as the <code>APP_URL</code>.</td></tr><tr><td><code>traefik.enable=true</code></td><td>Explicitly tell Traefik to expose this container</td></tr><tr><td><code>traefik.http.routers.speedtest-tracker.rule=Host(`speedtest.yourdomain.com`)</code></td><td>The domain the service will respond to</td></tr><tr><td><code>traefik.http.routers.speedtest-tracker.entrypoints=websecure</code></td><td>Allow request only from the predefined entry point</td></tr><tr><td><code>traefik.http.routers.speedtest-tracker.tls=true</code></td><td>When a TLS section is specified, it instructs Traefik that the current router is dedicated to HTTPS requests only</td></tr><tr><td><code>traefik.http.routers.speedtest-tracker.tls.certresolver=yourresolver</code></td><td>Explicitly tell Traefik which Certificate provider to use matching your Traefik configuration</td></tr><tr><td><code>traefik.http.services.speedtest-tracker.loadbalancer.server.port=80</code></td><td>Explicitly tell Traefik port to use to connect to the container</td></tr></tbody></table>

0 commit comments

Comments
 (0)