services:
  periphery:
    image: ghcr.io/moghtech/komodo-periphery:2.1.0
    init: true
    container_name: komodo-periphery
    restart: unless-stopped
    environment:
      PERIPHERY_CORE_ADDRESS: {{ komodo_core_host }}
      PERIPHERY_CONNECT_AS: {{ inventory_hostname }}
      PERIPHERY_CORE_PUBLIC_KEYS: file:/config/keys/core.pub
      PERIPHERY_ROOT_DIRECTORY: /etc/komodo
      PERIPHERY_DISABLE_TERMINALS: false
      PERIPHERY_DISABLE_CONTAINER_TERMINALS: false
      PERIPHERY_INCLUDE_DISK_MOUNTS: /etc/hostname
      KOMODO_SSL_ENABLED: false
      PERIPHERY_BIND_IP: 0.0.0.0
      PERIPHERY_ONBOARDING_KEY: "{{ komodo_onboarding_key }}"
      PERIPHERY_CORE_TLS_INSECURE_SKIP_VERIFY: true
      TZ: Europe/Lisbon
    volumes:
      - /data/komodo/app/keys:/config/keys
      - /var/run/docker.sock:/var/run/docker.sock
      - /proc:/proc
      - /etc/komodo:/etc/komodo
