--- # Adapted from: # https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/fpm/docker-compose.yml version: '3' volumes: postgres: nextcloud_src: nextcloud_data: certs: vhost.d: html: redis: jellyfin_config: jellyfin_cache: minidlna_state: minidlna_data: mopidy_data: networks: # This is for proxied containers proxy-tier: # This is for containers which need to be host mode lan: name: lan driver: macvlan driver_opts: parent: enp3s0 # our ethernet interface ipam: config: - gateway: 192.168.0.1 subnet: 192.168.0.0/24 ip_range: 192.168.0.240/29 # addresses 240-248 (6 usable) services: postgres: build: ./postgres restart: always healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] volumes: - postgres:/var/lib/postgresql/data env_file: - postgres.env redis: restart: always image: redis:6-alpine healthcheck: test: ["CMD", "redis-cli", "ping"] volumes: - redis:/data nextcloud: image: nextcloud:24-fpm-alpine restart: always volumes: - nextcloud_src:/var/www/html - nextcloud_data:/var/www/data - minidlna_data:/var/www/ext/media - /srv:/srv links: - postgres - redis env_file: - nextcloud.env environment: - POSTGRES_HOST=postgres - REDIS_HOST=redis - POSTGRES_USER=nextcloud # healthcheck: # test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"] nextcloud_cron: image: nextcloud:24-fpm-alpine restart: always volumes: - nextcloud_src:/var/www/html - nextcloud_data:/var/www/data - minidlna_data:/var/www/ext/media - /srv:/srv entrypoint: /cron.sh depends_on: - postgres - redis web: build: ./web restart: always volumes: - nextcloud_src:/var/www/html:ro env_file: - web.env depends_on: - nextcloud networks: - proxy-tier - default proxy: build: ./proxy restart: always ports: - "80:80" - "443:443" labels: com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" volumes: - certs:/etc/nginx/certs:ro - vhost.d:/etc/nginx/vhost.d - html:/usr/share/nginx/html - /var/run/docker.sock:/tmp/docker.sock:ro networks: - proxy-tier letsencrypt-companion: image: jrcs/letsencrypt-nginx-proxy-companion:v1.13.1 restart: always volumes: - certs:/etc/nginx/certs - vhost.d:/etc/nginx/vhost.d - html:/usr/share/nginx/html - /var/run/docker.sock:/var/run/docker.sock:ro networks: - proxy-tier depends_on: - proxy env_file: - letsencrypt-companion.env jellyfin: image: jellyfin/jellyfin:latest restart: always user: daemon:daemon volumes: - jellyfin_config:/config - jellyfin_cache:/cache - minidlna_data:/media networks: proxy-tier: default: lan: # Static ip for the container on the macvlan net ipv4_address: 192.168.0.241 env_file: - jellyfin.env minidlna: image: vladgh/minidlna:latest restart: always volumes: - minidlna_state:/minidlna - minidlna_data:/media:ro networks: default: lan: # Static ip for the container on the macvlan net ipv4_address: 192.168.0.242 environment: - UPID=2000 - UGID=2000 - MINIDLNA_INOTIFY=yes - MINIDLNA_MEDIA_DIR_1=A,/media/audio - MINIDLNA_MEDIA_DIR_2=V,/media/video - MINIDLNA_FRIENDLY_NAME=MiniDLNA@Snackpot mopidy: build: ./mopidy ports: - "6600:6600" - "6680:6680" - "8000:8000" extra_hosts: - "snackpot:host-gateway" volumes: # Makes mopidy data persistent - mopidy_data:/data # Add local music folder - minidlna_data:/music:ro networks: default: devices: - /dev/snd restart: always upmpdcli: build: ./upmpdcli depends_on: - mopidy networks: default: lan: # Static ip for the container on the macvlan net ipv4_address: 192.168.0.243 restart: always # Next three services adapted from # https://github.com/deisi/audiostation/blob/master/docker-compose.yml # and https://github.com/IVData/dockerfiles/blob/master/mopidy-multiroom/docker-compose.yml # snapserver: # image: ivdata/snapserver:latest # # ports: # # - "1704:1704" # # - "1705:1705" # # - "1780:1780" # volumes: # # The volume with the sharesound fifo for snapcast to work # - fifo:/tmp/snapcast # # command: "snapserver -s pipe:///tmp/sharesound/snapfifo?name=Radio" # # host mode is needed for snapserver advertisement # network_mode: host # restart: unless-stopped # snapclient: # image: ivdata/snapclient:latest # # ports: # # - "1704:1704" # # - "1705:1705" # # - "1780:1780" # devices: # - /dev/snd # volumes: # # The volume with the sharesound fifo for snapcast to work # - fifo:/tmp/snapcast # # command: "snapserver -s pipe:///tmp/sharesound/snapfifo?name=Radio" # # host mode is needed for snapserver advertisement # network_mode: host # restart: unless-stopped # environment: # - HOST=127.0.0.1 # mopidy: # image: ivdata/mopidy:latest # ports: # - "6600:6600" # - "6680:6680" # - "5555:5555" # depends_on: # - snapserver # volumes: # # The volume with the fifo for snapcast to work with # - fifo:/tmp/snapcast # # Makes mopidy data persistent # - mopidy_data:/mopidy # # Add local music folder # - minidlna_data:/media/music:ro # restart: unless-stopped # spotify: # image: audiostation/spotify:latest # # host mode is needed for Spotifyd advertisement # network_mode: host # depends_on: # - snapserver # volumes: # # The volume with the sharesound fifo for snapcast to work # - /tmp/sharesound:/tmp/sharesound # restart: unless-stopped