#
version: "3.7"

services:
  caddy:
    image: saile2204/caddy-proxy:latest
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "2019:2019"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - caddy_data:/data
      - caddy_config:/config
    depends_on:
      - ddns
    networks:
      - caddy
    deploy:
      labels: # Global options
        caddy.email: eliasstepanik@web.de


###Background Services###

  ddns:
    image: saile2204/ddns:latest
    restart: unless-stopped
    tty: true
    stdin_open: true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      LogLevel: "Debug"
  portsync:
    image: saile2204/portsync:latest
    restart: unless-stopped
    tty: true
    stdin_open: true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      LogLevel: "Information"
  ntfy:
    image: binwiederhier/ntfy
    command:
      - serve
    volumes:
      - ntfy_cache:/var/cache/ntfy
      - ntfy_data:/etc/ntfy
    restart: unless-stopped
    depends_on:
      - caddy
    networks:
      caddy:
    labels:
      caddy: "ntfy.sailehd.systems"
      caddy.reverse_proxy: "{{upstreams 80}}"
      caddy.tls.dns: "ionos 4dc281058e9648919a988315c84058fa.z0eKvfJSuUpeU-2W-quUCsM_6aSshAX8tdPrJ1NQUBtcaImOtoQCk82nT4kDWzBjj2l2PMo1vGXCc6vGW9bKHA"

###End Background Services###

###Essential Interfaces###
  proxmox:
    image: ubuntu
    command: sleep infinity
    restart: unless-stopped
    depends_on:
      - ddns
      - caddy
    labels:
      caddy: "proxmox.sailehd.systems"
      caddy.reverse_proxy: "https://192.168.178.66:8006 https://192.168.188.40:8006"
      caddy.reverse_proxy.transport: http
      caddy.reverse_proxy.transport.tls_insecure_skip_verify:
      caddy.tls.dns: "ionos 4dc281058e9648919a988315c84058fa.z0eKvfJSuUpeU-2W-quUCsM_6aSshAX8tdPrJ1NQUBtcaImOtoQCk82nT4kDWzBjj2l2PMo1vGXCc6vGW9bKHA"
  filecloud:
    image: ubuntu
    command: sleep infinity
    restart: unless-stopped
    depends_on:
      - ddns
      - caddy
    labels:
      caddy: "cloud.sailehd.systems"
      caddy.reverse_proxy: "http://192.168.178.120"
      caddy.tls.dns: "ionos 4dc281058e9648919a988315c84058fa.z0eKvfJSuUpeU-2W-quUCsM_6aSshAX8tdPrJ1NQUBtcaImOtoQCk82nT4kDWzBjj2l2PMo1vGXCc6vGW9bKHA"

  portainer:
    image: portainer/portainer-ee:latest
    networks:
      - caddy
    restart: unless-stopped
    ports:
      - 8000:8000
    depends_on:
      - ddns
      - caddy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - portainer_data:/data
    labels:
      caddy_1: "portainer.sailehd.systems"
      caddy_1.reverse_proxy_0: "{{upstreams 9000}}"
#      caddy.reverse_proxy_1: "apie/* {{upstreams 8000}}"
      caddy_1.tls.dns: "ionos 4dc281058e9648919a988315c84058fa.z0eKvfJSuUpeU-2W-quUCsM_6aSshAX8tdPrJ1NQUBtcaImOtoQCk82nT4kDWzBjj2l2PMo1vGXCc6vGW9bKHA"
      caddy_2: "portainer.nuv.systems"
      caddy_2.reverse_proxy_0: "{{upstreams 9000}}"
      caddy_2.tls.dns: "ionos 50cac0392a5f4732bb88e3aaa93d55aa.mOFFOjG-OUcLQjLLBSp1QFQ_1arBUMALP5SRDzx88encStOT5IcCHn7c1TqmmabTecfqWYlOzvdOITOkN0pkdw"
    deploy:
      labels:
        io.portainer.accesscontrol.teams: "Private"
###End Essential Interfaces###


###Ping###
  whoami0:
    image: jwilder/whoami
    networks:
      - caddy
    depends_on:
      - ddns
      - caddy
    restart: unless-stopped
    labels:
      caddy: "whoami.sailehd.systems"
      caddy.reverse_proxy: "{{upstreams 8000}}"
      caddy.tls.dns: "ionos 4dc281058e9648919a988315c84058fa.z0eKvfJSuUpeU-2W-quUCsM_6aSshAX8tdPrJ1NQUBtcaImOtoQCk82nT4kDWzBjj2l2PMo1vGXCc6vGW9bKHA"
###End Ping###



volumes:
  caddy_data:
  caddy_config:
  portainer_data:
  ntfy_data:
  ntfy_cache:



networks:
  caddy:
    driver: bridge
