43 lines
2.1 KiB
YAML
43 lines
2.1 KiB
YAML
- name: sonarr
|
|
type: build
|
|
image: localhost/sonarr:latest
|
|
pull: missing
|
|
format: oci
|
|
force_rm: true
|
|
container_file: |
|
|
FROM {{ alpine_base_image }}
|
|
LABEL maintainer="{{ maintainer }}"
|
|
RUN apk add --no-cache \
|
|
-X "{{ alpine_mirror }}/v{{ alpine_base_image.split(':')[-1] }}/main" \
|
|
-X "{{ alpine_mirror }}/v{{ alpine_base_image.split(':')[-1] }}/community" \
|
|
libintl sqlite-libs icu-libs curl jq \
|
|
&& url=$(curl -sL "https://api.github.com/repos/Sonarr/Sonarr/releases/latest" \
|
|
| jq -r '.assets[] | select(.name | test("linux-musl-x64.tar.gz$")) | .browser_download_url') \
|
|
&& curl -L -o /tmp/Sonarr.tar.gz "$url" \
|
|
&& mkdir -p /app && tar -xzf /tmp/Sonarr.tar.gz -C /app --strip-components=1
|
|
WORKDIR /app
|
|
|
|
- name: sonarr
|
|
type: container
|
|
image: localhost/sonarr:latest
|
|
volumes:
|
|
- "{{ config_root }}/sonarr:/config:Z"
|
|
- "{{ download_root }}/htpc:/downloads:z"
|
|
- "{{ media_root }}/tv:/tv:Z"
|
|
env:
|
|
TZ: "{{ tz }}"
|
|
SONARR__APP__LAUNCHBROWSER: false
|
|
SONARR__APP__INSTANCENAME: "{{ SONARR__APP__INSTANCENAME | default('Sonarr') }}"
|
|
SONARR__AUTH__METHOD: "{{ SONARR__AUTH__METHOD | default('Forms') }}"
|
|
SONARR__AUTH__APIKEY: "{{ SONARR__AUTH__APIKEY | default(lookup('password', '/dev/null length=32 chars=ascii_letters,digits')) }}"
|
|
SONARR__SERVER__ENABLESSL: "{{ SONARR__SERVER__ENABLESSL | default(false) }}"
|
|
SONARR__SERVER__SSLPORT: "{{ SONARR__SERVER__SSLPORT | default('9898') }}"
|
|
SONARR__SERVER__PORT: "{{ SONARR__SERVER__PORT | default('8989') }}"
|
|
SONARR__SERVER__BINDADDRESS: "{{ SONARR__SERVER__BINDADDRESS | default('*') }}"
|
|
SONARR__SERVER__SSLCERTPATH: "{{ SONARR__SERVER__SSLCERTPATH | default('/config/ssl/server.crt') }}"
|
|
SONARR__SERVER__SSLCERTPASSWORD: "{{ SONARR__SERVER__SSLCERTPASSWORD | default('/config/ssl/server.key') }}"
|
|
SONARR__LOG__ANALYTICSENABLED: "{{ SONARR__LOG__ANALYTICSENABLED | default(false) }}"
|
|
SONARR__UPDATE__AUTOMATICALLY: "{{ SONARR__UPDATE__AUTOMATICALLY | default(false) }}"
|
|
SONARR__LOG__LEVEL: "{{ SONARR__LOG__LEVEL | default('info') }}"
|
|
command: ["/app/Sonarr", "-data=/config"]
|
|
restart_policy: on-failure |