ansible/roles/docker/templates/aya01/compose.yaml

305 lines
8.5 KiB
YAML
Raw Normal View History

version: '3'
services:
traefik:
container_name: traefik
image: traefik:latest
restart: unless-stopped
networks:
net: {}
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "{{ traefik_config }}:/etc/traefik/"
- "{{ traefik_data }}:/var/log/"
ports:
- "{{ traefik_user_port}}:80"
- "{{ traefik_admin_port}}:8080"
db:
container_name: zoneminder_db
image: mariadb
restart: always
networks:
- zoneminder
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "{{ zoneminder_db }}:/var/lib/mysql"
environment:
- "MYSQL_DATABASE={{ zoneminder_host }}"
- "MYSQL_ROOT_PASSWORD={{ vault_mysql_root_password }}"
- "MYSQL_USER={{ mysql_user }}"
- "MYSQL_PASSWORD={{ vault_mysql_user_password }}"
- "MAX_LOG_SIZE_BYTES=1000000"
- "MAX_LOG_NUMBER=20"
- "TZ=Europe/Berlin"
zoneminder:
container_name: zoneminder
image: ghcr.io/zoneminder-containers/zoneminder-base:latest
restart: always
stop_grace_period: 45s
depends_on:
- db
networks:
- zoneminder
- net
ports:
- "{{ zoneminder_port }}:80"
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "{{ zoneminder_data }}:/data"
- "{{ zoneminder_config }}:/config"
- "{{ zoneminder_log}}:/log"
- type: tmpfs
target: /dev/shm
tmpfs:
size: 1000000000
environment:
- "MYSQL_DATABASE={{ zoneminder_host }}"
- "MYSQL_ROOT_PASSWORD={{ vault_mysql_root_password }}"
- "MYSQL_USER={{ mysql_user }}"
- "MYSQL_PASSWORD={{ vault_mysql_user_password }}"
- "MAX_LOG_SIZE_BYTES=1000000"
- "MAX_LOG_NUMBER=20"
- "TZ=Europe/Berlin"
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{ zoneminder_host }}.rule=Host(`{{ zoneminder_host}}.{{ aya01_host }}.{{ local_domain }}`)"
- "traefik.http.services.{{ zoneminder_host }}.loadbalancer.server.port=80"
pihole:
container_name: pihole
image: pihole/pihole:latest
restart: unless-stopped
networks:
- net
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "{{ pihole_port }}:80/tcp"
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "{{ pihole_config }}:/etc/pihole/"
- "{{ pihole_dnsmasq }}:/etc/dnsmasq.d/"
environment:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
- "WEBPASSWORD={{ vault_aya01_pihole_password }}"
- "ServerIP={{aya01_ip}}"
- "INTERFACE=eth0"
- "DNS1=1.1.1.1"
- "DNS1=1.0.0.1"
dns:
- 127.0.0.1
- 1.1.1.1
cap_add:
- NET_ADMIN
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{ pihole_host }}.rule=Host(`{{ pihole_host }}.{{ aya01_host }}.{{ local_domain }}`)"
- "traefik.http.services.{{ pihole_host }}.loadbalancer.server.port=80"
syncthing:
container_name: syncthing
image: syncthing/syncthing
restart: unless-stopped
networks:
- net
ports:
- "{{ syncthing_port }}:8384" # Web UI
- 22000:22000/tcp # TCP file transfers
- 22000:22000/udp # QUIC file transfers
- 21027:21027/udp # Receive local discovery broadcasts
volumes:
- "{{syncthing_data}}:/var/syncthing"
environment:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
hostname: syncthing
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{ syncthing_host }}.rule=Host(`{{ syncthing_host }}.{{ aya01_host }}.{{ local_domain }}`)"
- "traefik.http.services.{{ syncthing_host }}.loadbalancer.server.port={{ syncthing_port }}"
soft-serve:
container_name: soft-serve
image: charmcli/soft-serve:latest
restart: unless-stopped
networks:
- net
environment:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
ports:
- 23231:23231 # ssh
volumes:
- "{{ softserve_data }}:/soft-serve"
cupsd:
container_name: cupsd
image: olbat/cupsd
restart: unless-stopped
networks:
- net
environment:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
ports:
- "{{cupsd_port}}:631"
volumes:
- /var/run/dbus:/var/run/dbus
- "{{cupsd_config}}:/etc/cups"
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{ cupsd_host }}.rule=Host(`{{ cupsd_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{ cupsd_host }}.loadbalancer.server.port={{ cupsd_port }}"
kuma:
container_name: kuma
image: louislam/uptime-kuma:1
restart: always
networks:
- net
environment:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
ports:
- "{{ kuma_port }}:3001"
volumes:
- "{{ kuma_config }}:/app/data"
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{kuma_host}}.rule=Host(`{{ kuma_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{kuma_host}}.loadbalancer.server.port={{ kuma_port }}"
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
restart: always
networks:
- net
ports:
- "{{ plex_port }}:32400"
- "1900:1900"
- "3005:3005"
- "5353:5353"
- "32410:32410"
- "8324:8324"
- "32412:32412"
- "32469:32469"
environment:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
- VERSION=docker
volumes:
- "{{ plex_config }}:/config"
- "{{ plex_tv }}:/tv"
- "{{ plex_movies }}:/movies"
- "{{ plex_music }}:/music"
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{plex_host}}.rule=Host(`{{ plex_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{plex_host}}.loadbalancer.server.port={{ plex_port }}"
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
restart: always
networks:
- net
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
- TZ={{ timezone }}
volumes:
- {{ sonarr_config }}:/config
- {{ sonarr_media }}:/tv #optional
- {{ sonarr_downloads }}:/downloads #optional
ports:
- {{ sonarr_port }}:8989
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{sonarr_host}}.rule=Host(`{{ sonarr_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{sonarr_host}}.loadbalancer.server.port={{ sonarr_port }}"
radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
restart: always
networks:
- net
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
- TZ={{ timezone }}
volumes:
- {{ radarr_config }}:/config
- {{ radarr_media }}:/movies #optional
- {{ radarr_downloads }}:/downloads #optional
ports:
- {{ radarr_port }}:7878
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{radarr_host}}.rule=Host(`{{ radarr_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{radarr_host}}.loadbalancer.server.port={{ radarr_port }}"
lidarr:
image: lscr.io/linuxserver/lidarr:latest
container_name: lidarr
restart: always
networks:
- net
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
- TZ={{ timezone }}
volumes:
- {{ lidarr_config }}:/config
- {{ lidarr_media }}:/music #optional
- {{ lidarr_downloads }}:/downloads #optional
ports:
- {{ lidarr_port }}:8686
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{lidarr_host}}.rule=Host(`{{ lidarr_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{lidarr_host}}.loadbalancer.server.port={{ lidarr_port }}"
prowlarr:
image: lscr.io/linuxserver/prowlarr:latest
container_name: prowlarr
restart: always
networks:
- net
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
- TZ={{ timezone }}
volumes:
- {{ prowlarr_config }}:/config
ports:
- {{ prowlarr_port }}:9696
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{prowlarr_host}}.rule=Host(`{{ prowlarr_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{prowlarr_host}}.loadbalancer.server.port={{ prowlarr_port }}"
networks:
zoneminder:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.42.0/24
net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.69.0/24