feat(docker): Split docker compose to be deployed different services on different hosts. See host_vars of each host.
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Copy docker compose file to target
|
||||
ansible.builtin.template:
|
||||
src: "files/{{ item }}"
|
||||
src: "templates/{{ item }}.j2"
|
||||
dest: "/opt/docker/compose/{{ item }}"
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
|
||||
@@ -97,12 +97,3 @@
|
||||
opts: defaults,nolock
|
||||
state: mounted
|
||||
become: true
|
||||
|
||||
- name: Ensure /opt/docker is mounted via NFS
|
||||
ansible.posix.mount:
|
||||
path: /opt/docker
|
||||
src: 192.168.20.12:/opt/docker
|
||||
fstype: nfs
|
||||
opts: defaults,nolock
|
||||
state: mounted
|
||||
become: true
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
services:
|
||||
{% if enable_nginx %}
|
||||
nginx:
|
||||
container_name: "nginx"
|
||||
image: "jc21/nginx-proxy-manager:latest"
|
||||
@@ -13,7 +14,9 @@ services:
|
||||
- "/opt/docker/config/nginx/data:/data"
|
||||
- "/opt/docker/config/nginx/letsencrypt:/etc/letsencrypt"
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
{% endif %}
|
||||
|
||||
{% if enable_syncthing %}
|
||||
syncthing:
|
||||
image: syncthing/syncthing
|
||||
container_name: syncthing
|
||||
@@ -33,7 +36,9 @@ services:
|
||||
- PGID=1000
|
||||
- TZ=Europe/Berlin
|
||||
hostname: syncthing
|
||||
{% endif %}
|
||||
|
||||
{% if enable_kuma %}
|
||||
kuma:
|
||||
container_name: kuma
|
||||
image: louislam/uptime-kuma:1
|
||||
@@ -50,7 +55,9 @@ services:
|
||||
- "3001:3001"
|
||||
volumes:
|
||||
- "/opt/local/kuma/:/app/data"
|
||||
{% endif %}
|
||||
|
||||
{% if enable_plex %}
|
||||
plex:
|
||||
image: lscr.io/linuxserver/plex:latest
|
||||
container_name: plex
|
||||
@@ -80,7 +87,9 @@ services:
|
||||
- "/media/series:/tv:ro"
|
||||
- "/media/movies:/movies:ro"
|
||||
- "/media/songs:/music:ro"
|
||||
{% endif %}
|
||||
|
||||
{% if enable_arr %}
|
||||
sonarr:
|
||||
image: lscr.io/linuxserver/sonarr:latest
|
||||
container_name: sonarr
|
||||
@@ -206,7 +215,9 @@ services:
|
||||
volumes:
|
||||
- /opt/docker/config/qbit/config:/config
|
||||
- /media/docker/data/arr_downloads:/downloads
|
||||
{% endif %}
|
||||
|
||||
{% if enable_prometheus %}
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
container_name: prometheus
|
||||
@@ -222,7 +233,9 @@ services:
|
||||
volumes:
|
||||
- /opt/docker/config/prometheus/:/etc/prometheus/
|
||||
- prometheus_data:/prometheus/
|
||||
{% endif %}
|
||||
|
||||
{% if enable_grafana %}
|
||||
grafana:
|
||||
image: grafana/grafana-oss
|
||||
container_name: grafana
|
||||
@@ -239,7 +252,9 @@ services:
|
||||
volumes:
|
||||
- /media/docker/data/grafana/:/var/lib/grafana/
|
||||
- /opt/docker/config/grafana/config/:/etc/grafana/
|
||||
{% endif %}
|
||||
|
||||
{% if enable_ddns_updater %}
|
||||
ddns-updater:
|
||||
container_name: ddns-updater
|
||||
image: "ghcr.io/qdm12/ddns-updater"
|
||||
@@ -250,7 +265,9 @@ services:
|
||||
net: {}
|
||||
volumes:
|
||||
- "/opt/docker/config/ddns-updater/data/:/updater/data/"
|
||||
{% endif %}
|
||||
|
||||
{% if enable_homeassistant %}
|
||||
homeassistant:
|
||||
container_name: homeassistant
|
||||
image: "ghcr.io/home-assistant/home-assistant:stable"
|
||||
@@ -268,7 +285,9 @@ services:
|
||||
- 4357:4357
|
||||
- 5683:5683
|
||||
- 5683:5683/udp
|
||||
{% endif %}
|
||||
|
||||
{% if enable_stirling %}
|
||||
stirling:
|
||||
container_name: stirling
|
||||
image: frooodle/s-pdf:latest
|
||||
@@ -277,7 +296,9 @@ services:
|
||||
- nginx
|
||||
networks:
|
||||
net: {}
|
||||
{% endif %}
|
||||
|
||||
{% if enable_jellyfin %}
|
||||
jellyfin:
|
||||
container_name: jellyfin
|
||||
image: jellyfin/jellyfin
|
||||
@@ -296,7 +317,9 @@ services:
|
||||
- /media/songs:/music:ro
|
||||
ports:
|
||||
- "8096:8096"
|
||||
{% endif %}
|
||||
|
||||
{% if enable_paperless %}
|
||||
paperless-broker:
|
||||
container_name: paperless-broker
|
||||
image: docker.io/library/redis:7
|
||||
@@ -353,7 +376,9 @@ services:
|
||||
- "PAPERLESS_URL=https://paperless.docker-host00.lulu.seyshiro.de"
|
||||
- "PAPERLESS_TIME_ZONE=Europe/Berlin"
|
||||
- "PAPERLESS_OCR_LANGUAGE=deu"
|
||||
{% endif %}
|
||||
|
||||
{% if enable_gitea %}
|
||||
git:
|
||||
container_name: git
|
||||
image: gitea/gitea:1.20.5-rootless
|
||||
@@ -373,7 +398,9 @@ services:
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
{% endif %}
|
||||
|
||||
{% if enable_changedetection %}
|
||||
changedetection:
|
||||
container_name: changedetection
|
||||
image: dgtlmoon/changedetection.io
|
||||
@@ -384,7 +411,9 @@ services:
|
||||
- net
|
||||
volumes:
|
||||
- "/opt/docker/config/changedetection/data/:/datastore"
|
||||
{% endif %}
|
||||
|
||||
{% if enable_calibre %}
|
||||
calibre:
|
||||
container_name: calibre
|
||||
image: lscr.io/linuxserver/calibre-web:latest
|
||||
@@ -401,6 +430,7 @@ services:
|
||||
volumes:
|
||||
- "/opt/local/calibre/:/config"
|
||||
- "/media/docker/data/calibre/:/books"
|
||||
{% endif %}
|
||||
|
||||
networks:
|
||||
net:
|
||||
Reference in New Issue
Block a user