mirror of
https://github.com/fscotto/infra.git
synced 2026-11-26 21:59:50 +00:00
Add LAN-only aria2 downloads to Atlas
This commit is contained in:
30
ansible/roles/profile_atlas/templates/atlas-aria2.conf.j2
Normal file
30
ansible/roles/profile_atlas/templates/atlas-aria2.conf.j2
Normal file
@@ -0,0 +1,30 @@
|
||||
# Managed by Ansible. Never expose this file: it contains the RPC secret.
|
||||
dir=/downloads
|
||||
input-file=/config/session
|
||||
save-session=/config/session
|
||||
save-session-interval=30
|
||||
auto-save-interval=30
|
||||
continue=true
|
||||
allow-overwrite=false
|
||||
auto-file-renaming=false
|
||||
max-concurrent-downloads=1
|
||||
max-connection-per-server=1
|
||||
split=1
|
||||
max-tries=20
|
||||
retry-wait=10
|
||||
connect-timeout=30
|
||||
timeout=60
|
||||
check-certificate=true
|
||||
file-allocation=none
|
||||
umask=007
|
||||
enable-rpc=true
|
||||
rpc-listen-all=true
|
||||
rpc-listen-port=6800
|
||||
rpc-allow-origin-all=true
|
||||
rpc-secret={{ atlas_aria2_rpc_secret.content | b64decode | trim }}
|
||||
rpc-max-request-size=2M
|
||||
enable-dht=false
|
||||
enable-dht6=false
|
||||
enable-peer-exchange=false
|
||||
bt-enable-lpd=false
|
||||
console-log-level=warn
|
||||
@@ -0,0 +1,30 @@
|
||||
# Managed by Ansible. Bypass upstream init, tracker updates and deletion hooks.
|
||||
[Unit]
|
||||
Description=Atlas rootless HTTP downloader
|
||||
RequiresMountsFor={{ atlas_aria2_state_dir }} {{ atlas_aria2_downloads_dir }}
|
||||
|
||||
[Container]
|
||||
ContainerName=atlas-aria2
|
||||
Image={{ atlas_aria2_image }}
|
||||
UserNS=keep-id
|
||||
User={{ atlas_admin_uid }}
|
||||
Group={{ atlas_admin_gid }}
|
||||
Entrypoint=/usr/local/bin/aria2c
|
||||
Exec=--conf-path=/config/aria2.conf
|
||||
PublishPort={{ ansible_host }}:{{ atlas_aria2_rpc_port }}:6800
|
||||
Volume={{ atlas_aria2_state_dir }}:/config:Z
|
||||
Volume={{ atlas_aria2_downloads_dir }}:/downloads:z
|
||||
ReadOnly=true
|
||||
Tmpfs=/tmp:rw,nosuid,nodev
|
||||
NoNewPrivileges=true
|
||||
DropCapability=all
|
||||
StopTimeout=60
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
TimeoutStartSec=900
|
||||
TimeoutStopSec=90
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,22 @@
|
||||
# Managed by Ansible. Static frontend only; no host data or RPC secret mounted.
|
||||
[Unit]
|
||||
Description=Atlas AriaNg LAN Web UI
|
||||
|
||||
[Container]
|
||||
ContainerName=atlas-ariang
|
||||
Image={{ atlas_ariang_image }}
|
||||
UserNS=keep-id
|
||||
User={{ atlas_admin_uid }}
|
||||
Group={{ atlas_admin_gid }}
|
||||
PublishPort={{ ansible_host }}:{{ atlas_ariang_web_port }}:6880
|
||||
ReadOnly=true
|
||||
NoNewPrivileges=true
|
||||
DropCapability=all
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
TimeoutStartSec=900
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user