homelab/tasks/speedtest.yml

42 lines
1.3 KiB
YAML
Raw Normal View History

2024-09-09 22:37:51 +10:00
---
- name: Create directories
file:
path: "{{ item }}"
state: directory
with_items:
2024-09-10 22:09:43 +10:00
- "{{ data_folder }}/speedtest"
- "{{ data_folder }}/speedtest/config"
- "{{ data_folder }}/speedtest/web"
2024-09-09 22:37:51 +10:00
- name: Create the speedtest container
docker_container:
name: speedtest
image: lscr.io/linuxserver/speedtest-tracker:0.21.2
restart_policy: unless-stopped
recreate: true
networks:
- name: proxy
env:
APP_KEY: "base64:ViJcK7rSIwGC+TAW7pRWnczB43zPPVHH2Hx80t7eVm0="
PUID: "1000"
PGID: "1000"
DB_CONNECTION: "mysql"
DB_HOST: "{{ MYSQL_HOST }}"
DB_PORT: "3306"
DB_DATABASE: "{{ST_DATABASE}}"
DB_USERNAME: "{{ST_DB_USERNAME}}"
DB_PASSWORD: "{{ST_DB_PASSWORD}}"
TZ: "Australia/Brisbane"
SPEEDTEST_SCHEDULE: "0 * * * *"
DISPLAY_TIMEZONE: "Australia/Brisbane"
volumes:
2024-09-10 22:09:43 +10:00
- "{{ data_folder }}/speedtest/config:/config"
- "{{ data_folder }}/speedtest/web:/etc/ssl/web"
2024-09-09 22:37:51 +10:00
labels:
traefik.enable: "true"
traefik.http.routers.speedtest.rule: "Host(`speedtest.comprofix.xyz`)"
traefik.http.routers.speedtest.entrypoints: "https"
traefik.http.routers.speedtest.tls: "true"
traefik.http.services.speedtest.loadbalancer.server.port: "80"
traefik.http.services.speedtest.loadbalancer.server.scheme: "http"