diff --git a/config/.gitkeep b/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config/docker.yaml b/config/docker.yaml new file mode 100644 index 0000000..2217a14 --- /dev/null +++ b/config/docker.yaml @@ -0,0 +1,3 @@ +--- +my-docker: + socket: tcp://socket-proxy:${SOCKET_PROXY_PORT} diff --git a/config/services.yaml b/config/services.yaml new file mode 100644 index 0000000..ebc3a8e --- /dev/null +++ b/config/services.yaml @@ -0,0 +1,28 @@ +--- +# Network & Infrastructure +- Network: + - Pi-hole Primary: + icon: pi-hole.png + href: http://[IP_ADDRESS1]/admin/ # REPLACE WITH REAL IP + widget: + type: pihole + url: http://[IP_ADDRESS1] # REPLACE WITH REAL IP + key: "" # REPLACE WITH API KEY + - Pi-hole Secondary: + icon: pi-hole.png + href: http://[IP_ADDRESS2]/admin/ # REPLACE WITH REAL IP + widget: + type: pihole + url: http://[IP_ADDRESS2] # REPLACE WITH REAL IP + key: "" # REPLACE WITH API KEY + +# Automatic Discovery via Docker Attributes +# Services with 'homepage.group' labels will automatically appear here +# or in their specific groups if the group name matches. + +# This tells Homepage to look for Docker containers with "homepage.*" labels +# and add them to the dashboard automatically. +- Docker: + - my-docker: + template: "" # Use default templates if available + \ No newline at end of file diff --git a/config/settings.yaml b/config/settings.yaml new file mode 100644 index 0000000..a680268 --- /dev/null +++ b/config/settings.yaml @@ -0,0 +1,15 @@ +--- +title: Homelab +background: + image: https://images.unsplash.com/photo-1550684848-fac1c5b4e853?q=80&w=2070&auto=format&fit=crop + brightness: 50 + +theme: dark + +color: slate + +providers: + openweathermap: + apiKey: "" # Add your API key here + location: "Sao Paulo" # Add your location name or ID + units: metric diff --git a/config/widgets.yaml b/config/widgets.yaml new file mode 100644 index 0000000..2e9e355 --- /dev/null +++ b/config/widgets.yaml @@ -0,0 +1,15 @@ +--- +- resources: + cpu: true + memory: true + disk: / + +- search: + provider: duckduckgo + target: _blank + +- datetime: + text_size: xl + format: + timeStyle: short + dateStyle: medium diff --git a/docker-compose.yaml b/docker-compose.yaml index 3ff5a6a..a251f80 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,14 +5,16 @@ services: restart: unless-stopped networks: - proxy + - socket_proxy volumes: - - /srv/homelab/volumes/homepage/config:/app/config - - /var/run/docker.sock:/var/run/docker.sock:ro + - ./config:/app/config + # Docker socket is NOT mounted directly anymore environment: - PUID=1000 - PGID=1000 - TZ=America/Sao_Paulo - HOMEPAGE_ALLOWED_HOSTS=${DOMAIN} + - DOCKER_HOST=tcp://socket-proxy:${SOCKET_PROXY_PORT} labels: - "traefik.enable=true" - "traefik.http.routers.homepage.rule=Host(`homepage.${DOMAIN}`)" @@ -32,6 +34,20 @@ services: max-size: "10m" max-file: "3" + socket-proxy: + image: tecnativa/docker-socket-proxy + container_name: socket-proxy + restart: unless-stopped + networks: + - socket_proxy + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + environment: + - CONTAINERS=1 # Allow listing containers + - POST=0 # Disallow POST requests (write access) + networks: proxy: external: true + socket_proxy: + internal: true