mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 05:30:45 +00:00
navidrome: Move to Quadlet
This commit is contained in:
parent
2679166819
commit
67e16b82df
@ -1,13 +1,11 @@
|
|||||||
FROM docker.io/debian:bullseye-slim
|
FROM docker.io/debian:bookworm-slim
|
||||||
ARG VERSION=0.49.2
|
ARG VERSION=0.49.2
|
||||||
|
|
||||||
RUN apt-get update -y && apt-get upgrade -y && \
|
|
||||||
apt-get install -y --no-install-recommends curl ca-certificates gosu ffmpeg
|
|
||||||
|
|
||||||
ENV PACKAGE_URL https://github.com/deluan/navidrome/releases/download/v${VERSION}/navidrome_${VERSION}_Linux_x86_64.tar.gz
|
ENV PACKAGE_URL https://github.com/deluan/navidrome/releases/download/v${VERSION}/navidrome_${VERSION}_Linux_x86_64.tar.gz
|
||||||
RUN curl -L ${PACKAGE_URL} | tar -C /bin --no-same-owner -xvzf - navidrome && chmod +x /bin/navidrome
|
RUN apt-get update -y && apt-get upgrade -y && \
|
||||||
|
apt-get install -y --no-install-recommends curl ca-certificates gosu ffmpeg && \
|
||||||
RUN apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false curl
|
curl -L ${PACKAGE_URL} | tar -C /bin --no-same-owner -xvzf - navidrome && chmod +x /bin/navidrome && \
|
||||||
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false curl
|
||||||
|
|
||||||
RUN addgroup --system --gid 10000 navidrome
|
RUN addgroup --system --gid 10000 navidrome
|
||||||
RUN adduser --system --uid 10000 --ingroup navidrome --home /var/lib/navidrome navidrome
|
RUN adduser --system --uid 10000 --ingroup navidrome --home /var/lib/navidrome navidrome
|
||||||
|
17
service/navidrome/quadlet/navidrome.container
Normal file
17
service/navidrome/quadlet/navidrome.container
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Navidrome music server
|
||||||
|
Wants=container-build@%N.service container-volume@%N.service
|
||||||
|
After=container-build@%N.service container-volume@%N.service
|
||||||
|
|
||||||
|
[Container]
|
||||||
|
ContainerName=%N
|
||||||
|
Image=localhost/%N:latest
|
||||||
|
Network=internal
|
||||||
|
Volume=%N:/var/lib/%N:z
|
||||||
|
Volume=%N-music:/music:z,ro
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -4,9 +4,5 @@ storage:
|
|||||||
trees:
|
trees:
|
||||||
- path: /etc/coreos-home-server/navidrome
|
- path: /etc/coreos-home-server/navidrome
|
||||||
local: service/navidrome/
|
local: service/navidrome/
|
||||||
- path: /etc/systemd/system
|
- path: /etc/containers/systemd
|
||||||
local: service/navidrome/systemd/
|
local: service/navidrome/quadlet/
|
||||||
systemd:
|
|
||||||
units:
|
|
||||||
- name: navidrome.service
|
|
||||||
enabled: true
|
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Navidrome Music Server
|
|
||||||
Wants=container-build@%N.service container-volume@%N.service
|
|
||||||
After=container-build@%N.service container-volume@%N.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=notify
|
|
||||||
NotifyAccess=all
|
|
||||||
SyslogIdentifier=%N
|
|
||||||
Restart=on-failure
|
|
||||||
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
||||||
ExecStart=/bin/podman run --replace --name %N --net internal --sdnotify=conmon \
|
|
||||||
--volume %N:/var/lib/%N:z \
|
|
||||||
--volume %N-music:/music:z,ro \
|
|
||||||
localhost/%N:latest
|
|
||||||
ExecStop=/bin/podman stop --ignore --time 10 %N
|
|
||||||
ExecStopPost=/bin/podman rm --ignore --force %N
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
Loading…
Reference in New Issue
Block a user