All checks were successful
		
		
	
	GitOps Automatic Deployment / GitOps Automatic Deployment (push) Successful in 9s
				
			
		
			
				
	
	
		
			101 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			101 lines
		
	
	
		
			3.4 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 * * * * # (1)
 | |
|             - SPEEDTEST_SERVERS=5858 # (3)
 | |
|             - APP_KEY=${BASE64_APPKEY} # (2)
 | |
|             - 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 use [Crontab Guru](https://crontab.guru) to generate a cron expression to schedule automatic speedtests.  e.g. `*/15 * * * *` runs a speedtest every 15 minutes.
 | |
| 
 | |
| 2.  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.
 | |
| 
 | |
| 3.  This restricts the speedtest target to a specific speedtest server.  In this example, it is a Missoula, MT speedtest server.  You can get these codes from the yellow Speedtest button menu in the WebUI and then come back and redeploy the stack with the number entered here.  
 | |
| 
 | |
| ```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
 | |
| ``` |