services:
    uptimekuma:
        container_name: uptimekuma
        image: louislam/uptime-kuma:latest
        labels:
            traefik.docker.network: traefik
            traefik.enable: true
            traefik.http.routers.uptimekuma.entrypoints: websecure
            traefik.http.routers.uptimekuma.rule: Host(`uptimekuma.alexlebens.net`)
            traefik.http.routers.uptimekuma.service: uptimekuma
            traefik.http.services.uptimekuma.loadbalancer.server.port: 3001
        logging:
            driver: json-file
            options:
                max-size: 50m
                max-file: "3"
        networks:
            traefik: null
        restart: always
        privileged: true
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock
            - app:/app/data

    uptimekuma_api:
        container_name: uptimekuma_api
        depends_on:
            - uptimekuma
        environment:
            KUMA_SERVER: http://uptimekuma:3001
            KUMA_USERNAME: admin
            KUMA_PASSWORD: 24wrsfxv@$$WRSFXV
            ADMIN_PASSWORD: admin
        image: medaziz11/uptimekuma_restapi:latest
        labels:
            traefik.docker.network: traefik
            traefik.enable: true
            traefik.http.routers.uptimekuma_api.entrypoints: websecure
            traefik.http.routers.uptimekuma_api.rule: Host(`uptimekumaapi.alexlebens.net`)
            traefik.http.routers.uptimekuma_api.service: uptimekuma_api
            traefik.http.services.uptimekuma_api.loadbalancer.server.port: 8000
        logging:
            driver: json-file
            options:
                max-size: 50m
                max-file: "3"
        mem_limit: 1g
        networks:
            traefik: null
        restart: always
        privileged: true
        volumes:
            - db:/db

networks:
    traefik:
        name: traefik
        external: true

volumes:
    app:
        driver: local
        driver_opts:
            type: none
            o: bind
            device: /var/lib/docker/volumes/partition/uptimekuma_app

    db:
        driver: local
        driver_opts:
            type: none
            o: bind
            device: /var/lib/docker/volumes/partition/uptimekuma_db