services:
  homepage:
    extends:
      file: ${TEMPLATES_PATH}
      service: default
    image: ghcr.io/gethomepage/homepage:v1.12.3
    container_name: homepage
    ports:
      - 3030:3000
    networks:
      - ip4net
    environment:
      HOMEPAGE_VAR_LOCAL_DOMAIN: ${LOCAL_DOMAIN}
      HOMEPAGE_VAR_PUBLIC_DOMAIN: ${PUBLIC_DOMAIN}
      HOMEPAGE_VAR_LOCAL_VPS_DOMAIN: ${VPS_DOMAIN}
      HOMEPAGE_ALLOWED_HOSTS: homepage.${LOCAL_DOMAIN}, 192.168.178.35:3030
    volumes:
      - ${INFRA_PATH}/homepage/config:/app/config
      - ${INFRA_PATH}/homepage/data/images:/app/public/images
      - ${INFRA_PATH}/homepage/data/icons:/app/public/icons
      - ${EXTERNAL_STORAGE}:/disks/e
      - /var/run/docker.sock:/var/run/docker.sock:ro # optional, for docker integrations
    labels:
      # Traefik
      - "traefik.enable=true"
      - "traefik.http.routers.homepage.rule=Host(`homepage.${LOCAL_DOMAIN}`)"
      - "traefik.http.routers.homepage.entrypoints=https"
      - "traefik.http.routers.homepage.tls=true"
