All checks were successful
GitOps Automatic Deployment / GitOps Automatic Deployment (push) Successful in 8s
97 lines
3.0 KiB
Markdown
97 lines
3.0 KiB
Markdown
## Purpose:
|
|
Speedtest Tracker is a self-hosted application that monitors the performance and uptime of your internet connection over time.
|
|
[Detailed Configuration Reference](https://docs.speedtest-tracker.dev/getting-started/installation)
|
|
|
|
## Docker Configuration
|
|
```yaml title="docker-compose.yml"
|
|
services:
|
|
speedtest-tracker:
|
|
image: lscr.io/linuxserver/speedtest-tracker:latest
|
|
restart: unless-stopped
|
|
container_name: speedtest-tracker
|
|
ports:
|
|
- 8080:80
|
|
- 8443:443
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=${TIMEZONE}
|
|
- ASSET_URL=${PUBLIC_FQDN}
|
|
- APP_TIMEZONE=${TIMEZONE}
|
|
- DISPLAY_TIMEZONE=${TIMEZONE}
|
|
- SPEEDTEST_SCHEDULE=*/15 * * * *
|
|
- SPEEDTEST_SERVERS=5858
|
|
- APP_KEY=${BASE64_APPKEY} # (1)
|
|
- DB_CONNECTION=pgsql
|
|
- DB_HOST=db
|
|
- DB_PORT=5432
|
|
- DB_DATABASE=${DB_DATABASE}
|
|
- DB_USERNAME=${DB_USERNAME}
|
|
- DB_PASSWORD=${DB_PASSWORD}
|
|
volumes:
|
|
- /srv/containers/speedtest-tracker/config:/config
|
|
- /srv/containers/speedtest-tracker/custom-ssl-keys:/config/keys
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
docker_network:
|
|
ipv4_address: 192.168.5.38
|
|
|
|
db:
|
|
image: postgres:17
|
|
restart: always
|
|
environment:
|
|
- POSTGRES_DB=${DB_DATABASE}
|
|
- POSTGRES_USER=${DB_USERNAME}
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
|
- TZ=${TIMEZONE}
|
|
volumes:
|
|
- /srv/containers/speedtest-tracker/db:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
retries: 5
|
|
timeout: 5s
|
|
networks:
|
|
docker_network:
|
|
ipv4_address: 192.168.5.39
|
|
networks:
|
|
default:
|
|
external:
|
|
name: docker_network
|
|
docker_network:
|
|
external: true
|
|
```
|
|
|
|
1. You can generate a secure appkey with the following command: `echo -n 'base64:'; openssl rand -base64 32;` > Copy this key including the base64: prefix and paste it as your APP_KEY environment variable value.
|
|
|
|
```yaml title=".env"
|
|
DB_PASSWORD=SecurePassword
|
|
DB_DATABASE=speedtest_tracker
|
|
DB_USERNAME=speedtest_tracker
|
|
TIMEZONE=America/Denver
|
|
PUBLIC_FQDN=https://speedtest.bunny-lab.io
|
|
BASE64_APPKEY=SECUREAPPKEY
|
|
```
|
|
|
|
## Traefik Reverse Proxy Configuration
|
|
If the container does not run on the same host as Traefik, you will need to manually add configuration to Traefik's dynamic config file, outlined below.
|
|
```yaml
|
|
http:
|
|
routers:
|
|
speedtest-tracker:
|
|
entryPoints:
|
|
- websecure
|
|
tls:
|
|
certResolver: letsencrypt
|
|
http2:
|
|
service: speedtest-tracker
|
|
rule: Host(`speedtest.bunny-lab.io`)
|
|
|
|
services:
|
|
speedtest-tracker:
|
|
loadBalancer:
|
|
servers:
|
|
- url: http://192.168.5.38:80
|
|
passHostHeader: true
|
|
``` |