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
    cgroup: host
    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"
    deploy:
        resources:
            limits:
              memory: "1G"
            reservations:
              memory: "512M"
  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"
    deploy:
        resources:
            limits:
              memory: "1G"
            reservations:
              memory: "512M"



volumes:
  caddy_data:
  caddy_config:


networks:
  caddy:
    driver: bridge
