secrets:
    title:
      file: /gurulandia/data/homepage/secrets/title
services:
  homepage:
    image: ghcr.io/gethomepage/homepage:latest
    container_name: homepage
    ports:
      - 3000:3000
    volumes:
      - /gurulandia/data/homepage:/app/config # Make sure your local config directory exists
      - /var/run/docker.sock:/var/run/docker.sock:ro # (optional) For docker integrations
    environment:
      - PUID=1000
      - PGID=1000
      - HOMEPAGE_VAR_BASE="https://homepage.lab.gurulandia.eu/"
      #- HOMEPAGE_VAR_TITLE="Gurulandia's Awesome Homepage"
      - HOMEPAGE_FILE_TITLE=/run/secrets/title
    networks:
      - proxy
      - socket_proxy
    labels:
      traefik.enable: true
      ## HTTP Routers
      traefik.http.routers.homepage-rtr.entrypoints: https
      traefik.http.routers.homepage-rtr.rule: Host(`homepage.lab.gurulandia.eu`)
      ## Middlewares
      #- "traefik.http.routers.${GOTIFY_HOST_NAME}-rtr.middlewares=chain-authelia@file"
      traefik.http.routers.homepage-rtr.middlewares: chain-authentik@file
      #traefik.http.routers.homepage-rtr.middlewares: chain-no-auth@file
      ## HTTP Services
      traefik.http.routers.homepage-rtr.service: homepage-svc
      traefik.http.services.homepage-svc.loadbalancer.server.port: 3000     
    secrets:
      - title
networks:
  proxy:
    external: true
  socket_proxy:
    external: true


#services:
#  homepage:        
#    labels:
#      - "traefik.enable=true"
      ## HTTP Routers
#      - "traefik.http.routers.${HOMEPAGE_HOSTNAME}-rtr.entrypoints=https"
#      - "traefik.http.routers.${HOMEPAGE_HOSTNAME}-rtr.rule=Host(`${HOMEPAGE_HOSTNAME}.$DOMAINNAME1`)"
      ## Middlewares
#      - "traefik.http.routers.${HOMEPAGE_HOSTNAME}-rtr.middlewares=chain-authelia@file"
#      - "traefik.http.routers.${HOMEPAGE_HOSTNAME}-rtr.middlewares=chain-no-auth@file"
      ## HTTP Services
#      - "traefik.http.routers.${HOMEPAGE_HOSTNAME}-rtr.service=${HOMEPAGE_HOSTNAME}-svc"
#      - "traefik.http.services.${HOMEPAGE_HOSTNAME}-svc.loadbalancer.server.port=22300"