Refactor nftables, vpn and transmission configuration
This commit is contained in:
parent
465a5d2887
commit
dcbdfdc422
24 changed files with 292 additions and 192 deletions
13
templates/transmission/config.j2
Normal file
13
templates/transmission/config.j2
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"download-dir": "/app/downloads",
|
||||
"incomplete-dir": "/app/incomplete_downloads",
|
||||
"incomplete-dir-enabled": true,
|
||||
"peer-port": {{ transmission_peer_port }},
|
||||
"rpc-port": {{ transmission_web_port }},
|
||||
"rpc-host-whitelist-enabled": false,
|
||||
"rpc-whitelist-enabled": false,
|
||||
"ratio-limit": {{ transmission_ratelimit_ratio }},
|
||||
"ratio-limit-enabled": true,
|
||||
"speed-limit-up": 5,
|
||||
"speed-limit-up-enabled": true
|
||||
}
|
||||
32
templates/transmission/docker-compose.j2
Normal file
32
templates/transmission/docker-compose.j2
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
networks:
|
||||
transmission-net:
|
||||
ipam:
|
||||
config:
|
||||
- subnet: '{{ transmission_subnet }}'
|
||||
|
||||
services:
|
||||
transmission:
|
||||
image: alpine:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
networks:
|
||||
transmission-net:
|
||||
volumes:
|
||||
- {{ transmission_download_dir }}:/app/downloads
|
||||
- {{ transmission_incomplete_dir }}:/app/incomplete_downloads
|
||||
- {{ transmission_app_dir }}/config:/app/config
|
||||
|
||||
nginx:
|
||||
image: nginx:mainline-alpine
|
||||
depends_on:
|
||||
- transmission
|
||||
restart: always
|
||||
networks:
|
||||
transmission-net:
|
||||
ipv4_address: '{{ transmission_nginx_ip }}'
|
||||
volumes:
|
||||
- '{{ transmission_app_dir }}/nginx.conf.d:/etc/nginx/conf.d'
|
||||
20
templates/transmission/nginx.j2
Normal file
20
templates/transmission/nginx.j2
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
upstream transmission-upstream {
|
||||
server transmission:9091;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name {{ transmission_domain }};
|
||||
|
||||
location / {
|
||||
proxy_read_timeout 300;
|
||||
proxy_pass_header X-Transmission-Session-Id;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_pass http://transmission-upstream;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue