services:
    homepage:
        container_name: homepage
        image: ghcr.io/benphelps/homepage:latest
        labels:
            traefik.docker.network: traefik
            traefik.enable: true
            traefik.http.routers.homepage.entrypoints: websecure
            traefik.http.routers.homepage.rule: Host(`homepage.alexlebens.net`)
            traefik.http.routers.homepage.service: homepage
            traefik.http.routers.homepage.middlewares: authentik@file
            traefik.http.services.homepage.loadbalancer.server.port: 3000
        logging:
            driver: json-file
            options:
                max-size: 50m
                max-file: "3"
        networks:
            traefik: null
        restart: always
        privileged: true
        volumes:
            - config:/app/config
            - images:/app/public/images
            - icons:/app/public/icons

    dockerproxy:
        container_name: homepage_dockerproxy
        environment:
            - CONTAINERS=1
            - POST=0
        image: ghcr.io/tecnativa/docker-socket-proxy:latest
        logging:
            driver: json-file
            options:
                max-size: 50m
                max-file: "3"
        networks:
            traefik: null
        restart: unless-stopped
        privileged: true
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock:ro

networks:
    traefik:
        name: traefik
        external: true

volumes:
    config:
        driver: local
        driver_opts:
            type: none
            o: bind
            device: /var/lib/docker/volumes/partition/homepage_config

    images:
        driver: local
        driver_opts:
            type: none
            o: bind
            device: /var/lib/docker/volumes/partition/homepage_images

    icons:
        driver: local
        driver_opts:
            type: none
            o: bind
            device: /var/lib/docker/volumes/partition/homepage_icons