Install librespeed

This commit is contained in:
Jake Howard 2020-01-30 13:43:28 +00:00
parent cdc7209013
commit 1414357ad7
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,16 @@
version: "2"
services:
librespeed:
image: linuxserver/librespeed:5.1-ls2
container_name: librespeed
environment:
- PUID=3000
- PGID=3000
- TZ=Europe/London
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.librespeed.rule=Host(`speed.jakehoward.tech`)"
- "traefik.http.routers.librespeed.tls=true"
- "traefik.http.routers.librespeed.tls.certresolver=le"
- "traefik.http.routers.librespeed.middlewares=internal-only@file"

View file

@ -0,0 +1,31 @@
- name: Create librespeed directory
file:
path: '/opt/librespeed'
state: directory
owner: "{{ docker_user.name }}"
mode: "{{ docker_compose_directory_mask }}"
become: true
become_user: root
- name: Install librespeed compose file
template:
src: files/librespeed/docker-compose.yml
dest: "/opt/librespeed/docker-compose.yml"
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
validate: /usr/bin/docker-compose -f %s config
register: compose_file
become: true
become_user: root
- name: Cycle librespeed container
docker_compose:
project_src: /opt/librespeed
pull: true
remove_orphans: true
remove_volumes: true
state: "{{ item }}"
when: compose_file.changed
loop:
- absent
- present

View file

@ -21,3 +21,6 @@
- name: Install emby
include: emby.yml
- name: Install librespeed
include: librespeed.yml