Deploy deluge in docker

Makes version managing so much easier!
This commit is contained in:
Jake Howard 2021-02-01 17:24:36 +00:00
parent ac68b36841
commit e8496ddced
Signed by: jake
GPG key ID: 57AFB45680EDD477
5 changed files with 51 additions and 0 deletions

View file

@ -13,3 +13,5 @@ pve_hosts:
ip: 192.168.2.41
forrest:
internal_ip: 10.23.1.99
deluge:
internal_ip: 10.23.1.52

View file

@ -70,3 +70,7 @@
- hosts: forrest
roles:
- forrest
- hosts: deluge
roles:
- deluge

View file

@ -0,0 +1,24 @@
version: "2.3"
services:
deluge:
image: linuxserver/deluge:latest
network_mode: host
environment:
- PUID={{ docker_user.id }}
- PGID={{ docker_user.id }}
- TZ=Europe/London
volumes:
- ./deluge:/config
- /mnt/downloads:/downloads
restart: unless-stopped
egress:
image: theorangeone/static-server:latest
restart: unless-stopped
environment:
- INDEX=on
volumes:
- /mnt/downloads:/srv:ro
ports:
- 80:80

View file

@ -0,0 +1,4 @@
- name: restart deluge
shell:
chdir: /opt/deluge
cmd: "{{ docker_update_command }}"

View file

@ -0,0 +1,17 @@
- name: Create deluge directory
file:
path: /opt/deluge
state: directory
owner: "{{ docker_user.name }}"
mode: "{{ docker_compose_directory_mask }}"
become: true
- name: Install deluge compose file
template:
src: files/docker-compose.yml
dest: /opt/deluge/docker-compose.yml
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
validate: /usr/bin/docker-compose -f %s config
notify: restart deluge
become: true