Initial commit with working nginx and jellyfin
This commit is contained in:
commit
f4310c2e7d
|
@ -0,0 +1,9 @@
|
|||
base_domain: "homelab.cz"
|
||||
data_folder: "{{ playbook_dir }}/docker-data"
|
||||
nginx_confd_folder: "{{ data_folder }}/nginx/conf.d"
|
||||
puid: "1000"
|
||||
pgid: "1000"
|
||||
tz: "Europe/Prague"
|
||||
media:
|
||||
tv: "{{ data_folder }}/media/tv"
|
||||
movies: "{{ data_folder }}/media/movies"
|
|
@ -0,0 +1 @@
|
|||
localhost ansible_conection=local
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- nginx
|
||||
- jellyfin
|
|
@ -0,0 +1,25 @@
|
|||
- name: run jellyfin container
|
||||
docker_container:
|
||||
name: 'jellyfin'
|
||||
image: linuxserver/jellyfin
|
||||
volumes:
|
||||
- "{{ data_folder }}/jellyfin:/config"
|
||||
- "{{ media.tv }}:/data/tvshows"
|
||||
- "{{ media.movies }}:/data/movies"
|
||||
ports:
|
||||
- "8096:8096"
|
||||
- "8920:8920"
|
||||
- "7359:7359/udp"
|
||||
- "1900:1900/udp"
|
||||
env:
|
||||
PUID={{ puid }}
|
||||
PGID={{ pgid }}
|
||||
TZ={{ tz }}
|
||||
devices:
|
||||
- /dev/dri:/dev/dri
|
||||
state: started
|
||||
- name: copy jellyfin config to nginx
|
||||
template:
|
||||
src: jellyfin.conf
|
||||
dest: "{{ nginx_confd_folder }}"
|
||||
notify: reload nginx
|
|
@ -0,0 +1,11 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name "jellyfin.{{ base_domain }}";
|
||||
set $jellyfin 192.168.0.107;
|
||||
#resolver 127.0.0.1 valid=30;
|
||||
|
||||
location / {
|
||||
proxy_pass http://$jellyfin:8096;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
- name: reload nginx
|
||||
command: docker restart nginx
|
|
@ -0,0 +1,12 @@
|
|||
- name: run nginx container
|
||||
docker_container:
|
||||
name: 'nginx'
|
||||
image: nginx
|
||||
volumes:
|
||||
- "{{ nginx_confd_folder }}:/etc/nginx/conf.d"
|
||||
ports:
|
||||
- "80:80"
|
||||
env:
|
||||
NGINX_HOST: "{{ base_domain }}"
|
||||
NGINX_PORT: '80'
|
||||
state: started
|
Loading…
Reference in New Issue