Split pod-music into two containers
This commit is contained in:
parent
fba3e754df
commit
faa1d9e17e
@ -148,7 +148,8 @@ services_host_services:
|
||||
address: "{{ vpn_bridge_prefix }}.6"
|
||||
music:
|
||||
address: "{{ vpn_bridge_prefix }}.7"
|
||||
music_path: "{{ music_user_data_collection_directory }}"
|
||||
collection_path: "{{ music_user_data_collection_directory }}"
|
||||
archive_path: "{{ music_user_data_archive_directory }}"
|
||||
|
||||
# --------------------------------------------------------------------------------------------------
|
||||
# services:backups
|
||||
|
@ -6,6 +6,7 @@ paths:
|
||||
default: $albumartist/$year $album%aunique{}/$track $title
|
||||
singleton: Non-Album/$artist/$title
|
||||
comp: Compilations/$year $album%aunique{}/$track $title
|
||||
|
||||
import:
|
||||
move: yes
|
||||
write: no
|
||||
|
@ -32,6 +32,9 @@ argument_specs:
|
||||
required: true
|
||||
services_host_services:
|
||||
music:
|
||||
music_path:
|
||||
collection_path:
|
||||
type: "str"
|
||||
required: true
|
||||
archive_path:
|
||||
type: "str"
|
||||
required: true
|
||||
|
@ -18,7 +18,8 @@
|
||||
mode: 0600
|
||||
loop:
|
||||
- "pod-music.service"
|
||||
- "container-music-navidrome.service"
|
||||
- "container-music-collection.service"
|
||||
- "container-music-archive.service"
|
||||
register: services_deploy_music_systemd_files
|
||||
|
||||
- name: "systemd user daemon reload"
|
||||
|
@ -0,0 +1,39 @@
|
||||
[Unit]
|
||||
Description=Podman container-music-archive.service
|
||||
Documentation=man:podman-generate-systemd(1)
|
||||
Wants=network.target
|
||||
After=network-online.target
|
||||
BindsTo=pod-music.service
|
||||
After=pod-music.service
|
||||
OnFailure=status-mail@%n.service
|
||||
|
||||
[Service]
|
||||
Environment=PODMAN_SYSTEMD_UNIT=%n
|
||||
Restart=on-failure
|
||||
TimeoutStopSec=70
|
||||
ExecStartPre=/bin/rm -f %t/container-music-archive.pid %t/container-music-archive.ctr-id
|
||||
ExecStart=/usr/bin/podman run \
|
||||
--conmon-pidfile %t/container-music-archive.pid \
|
||||
--cidfile %t/container-music-archive.ctr-id \
|
||||
--cgroups=no-conmon \
|
||||
--pod-id-file %t/pod-music.pod-id \
|
||||
--replace \
|
||||
--label "io.containers.autoupdate=image" \
|
||||
-dt \
|
||||
-v {{ services_root_directory }}/{{ services_resolv_host }}-resolv.conf:/etc/resolv.conf:ro \
|
||||
-v {{ services_data_directory }}/pod-music/archive/_data:/data \
|
||||
-v {{ services_host_services[services_service_name].archive_path }}:/music:ro \
|
||||
-e ND_PORT="8080" \
|
||||
-e ND_IGNOREDARTICLES="The El La Los Las Le Les Os O A" \
|
||||
-e ND_ENABLESTARRATING="false" \
|
||||
-e ND_LASTFM_ENABLED="false" \
|
||||
-e ND_PASSWORDENCRYPTIONKEY={{ services[services_service_name].password_encryption_key }} \
|
||||
--name=pod-music-archive \
|
||||
docker.io/deluan/navidrome:{{ services_deploy_versions.music.navidrome }}
|
||||
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-music-archive.ctr-id -t 10
|
||||
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-music-archive.ctr-id
|
||||
PIDFile=%t/container-music-archive.pid
|
||||
Type=forking
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target default.target
|
@ -1,5 +1,5 @@
|
||||
[Unit]
|
||||
Description=Podman container-music-navidrome.service
|
||||
Description=Podman container-music-collection.service
|
||||
Documentation=man:podman-generate-systemd(1)
|
||||
Wants=network.target
|
||||
After=network-online.target
|
||||
@ -11,27 +11,28 @@ OnFailure=status-mail@%n.service
|
||||
Environment=PODMAN_SYSTEMD_UNIT=%n
|
||||
Restart=on-failure
|
||||
TimeoutStopSec=70
|
||||
ExecStartPre=/bin/rm -f %t/container-music-navidrome.pid %t/container-music-navidrome.ctr-id
|
||||
ExecStartPre=/bin/rm -f %t/container-music-collection.pid %t/container-music-collection.ctr-id
|
||||
ExecStart=/usr/bin/podman run \
|
||||
--conmon-pidfile %t/container-music-navidrome.pid \
|
||||
--cidfile %t/container-music-navidrome.ctr-id \
|
||||
--conmon-pidfile %t/container-music-collection.pid \
|
||||
--cidfile %t/container-music-collection.ctr-id \
|
||||
--cgroups=no-conmon \
|
||||
--pod-id-file %t/pod-music.pod-id \
|
||||
--replace \
|
||||
--label "io.containers.autoupdate=image" \
|
||||
-dt \
|
||||
-v {{ services_root_directory }}/{{ services_resolv_host }}-resolv.conf:/etc/resolv.conf:ro \
|
||||
-v {{ services_data_directory }}/pod-music/data/_data:/data \
|
||||
-v {{ services_host_services[services_service_name].music_path }}:/music:ro \
|
||||
-v {{ services_data_directory }}/pod-music/collection/_data:/data \
|
||||
-v {{ services_host_services[services_service_name].collection_path }}:/music:ro \
|
||||
-e ND_PORT="80" \
|
||||
-e ND_IGNOREDARTICLES="The El La Los Las Le Les Os O A" \
|
||||
-e ND_ENABLESTARRATING="false" \
|
||||
-e ND_LASTFM_ENABLED="false" \
|
||||
-e ND_PASSWORDENCRYPTIONKEY={{ services[services_service_name].password_encryption_key }} \
|
||||
--name=pod-music-navidrome \
|
||||
--name=pod-music-collection \
|
||||
docker.io/deluan/navidrome:{{ services_deploy_versions.music.navidrome }}
|
||||
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-music-navidrome.ctr-id -t 10
|
||||
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-music-navidrome.ctr-id
|
||||
PIDFile=%t/container-music-navidrome.pid
|
||||
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-music-collection.ctr-id -t 10
|
||||
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-music-collection.ctr-id
|
||||
PIDFile=%t/container-music-collection.pid
|
||||
Type=forking
|
||||
|
||||
[Install]
|
@ -3,8 +3,8 @@ Description=Podman pod-music.service
|
||||
Documentation=man:podman-generate-systemd(1)
|
||||
Wants=network.target
|
||||
After=network-online.target
|
||||
Requires=container-music-navidrome.service
|
||||
Before=container-music-navidrome.service
|
||||
Requires=container-music-collection.service container-music-archive.service
|
||||
Before=container-music-collection.service container-music-archive.service
|
||||
OnFailure=status-mail@%n.service
|
||||
|
||||
[Service]
|
||||
|
@ -0,0 +1,35 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name archive.music.wojciechkozlowski.eu;
|
||||
|
||||
location ^~ /.well-known {
|
||||
allow all;
|
||||
root /var/www/html;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$server_name$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name archive.music.wojciechkozlowski.eu;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/archive.music.wojciechkozlowski.eu/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/archive.music.wojciechkozlowski.eu/privkey.pem;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/archive.music.wojciechkozlowski.eu/chain.pem;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://pod-music:8080;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
}
|
@ -7,6 +7,7 @@ services_rproxy_nginx_add_hosts: "\
|
||||
{{ add_host_list | join(' ') }}"
|
||||
services_rproxy_nginx_conf_d_files:
|
||||
- "nginx.conf"
|
||||
- "nginx-conf.d/archive.music.wojciechkozlowski.eu.conf"
|
||||
- "nginx-conf.d/cloud.wojciechkozlowski.eu.conf"
|
||||
- "nginx-conf.d/git.wojciechkozlowski.eu.conf"
|
||||
- "nginx-conf.d/music.wojciechkozlowski.eu.conf"
|
||||
|
@ -21,4 +21,5 @@ services_volumes:
|
||||
notes:
|
||||
data:
|
||||
music:
|
||||
data:
|
||||
collection:
|
||||
archive:
|
||||
|
Loading…
x
Reference in New Issue
Block a user