--- name: uptime-kuma networks: uptime-kuma_net: attachable: false internal: false external: false name: uptime-kuma driver: bridge ipam: driver: default config: - subnet: 172.19.3.0/24 ip_range: 172.19.3.0/24 gateway: 172.19.3.1 driver_opts: com.docker.network.bridge.default_bridge: "false" com.docker.network.bridge.enable_icc: "true" com.docker.network.bridge.enable_ip_masquerade: "true" com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" com.docker.network.bridge.name: "uptimekuma" com.docker.network.driver.mtu: "1500" labels: com.uptime-kuma.network.description: "is an isolated bridge network." services: uptime-kuma_db: deploy: resources: limits: pids: 2048 # Limits the number of processes and threads (fork bomb protection). restart: unless-stopped logging: driver: "json-file" options: max-size: "1M" max-file: "2" stop_grace_period: 1m container_name: uptime-kuma_db image: docker.io/mariadb:13.1.2@sha256:396c449ce655b679f6abca2ecbcf7c2dfe1df233b3f22d83f2db17d5fcd1006c pull_policy: if_not_present volumes: - /docker/uptime-kuma/production/db:/var/lib/mysql - /docker/uptime-kuma/production/my.cnf:/etc/my.cnf - /sys/fs/cgroup/memory.pressure:/sys/fs/cgroup/memory.pressure env_file: # Compose loads each file that exists and skips a missing one: # '.env' for the Docker Compose CLI, 'stack.env' for Portainer. - path: .env required: false - path: stack.env required: false environment: PUID: "1000" PGID: "1000" TZ: Europe/Amsterdam # Adjust the timezone to match your local timezone. You can find the full list of timezones here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. MARIADB_ROOT_PASSWORD: ${ROOT_PASSWORD_DB} # Fill in the value in both the .env and stack.env files MARIADB_DATABASE: ${NAME_DB} # Fill in the value in both the .env and stack.env files MARIADB_USER: ${USER_DB} # Fill in the value in both the .env and stack.env files MARIADB_PASSWORD: ${PASSWORD_DB} # Fill in the value in both the .env and stack.env files hostname: uptime-kuma_db networks: uptime-kuma_net: ipv4_address: 172.19.3.2 security_opt: - no-new-privileges:true labels: com.uptime-kuma.db.description: "is an MariaDB database." healthcheck: disable: false test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] interval: 10s timeout: 5s retries: 3 start_period: 10s start_interval: 5s uptime-kuma_app: deploy: resources: limits: pids: 512 # Limits the number of processes and threads (fork bomb protection). restart: unless-stopped logging: driver: "json-file" options: max-size: "1M" max-file: "2" stop_grace_period: 1m container_name: uptime-kuma image: ghcr.io/louislam/uptime-kuma:2.5.13-slim@sha256:4028be66c425621731407e992343d486f7b74e4e28956de032ce85552285beaa pull_policy: if_not_present depends_on: uptime-kuma_db: condition: service_healthy volumes: - /docker/uptime-kuma/production/app:/app/data - /usr/local/share/ca-certificates:/app/data/docker-tls env_file: # Compose loads each file that exists and skips a missing one: # '.env' for the Docker Compose CLI, 'stack.env' for Portainer. - path: .env required: false - path: stack.env required: false environment: PUID: "1000" PGID: "1000" TZ: Europe/Amsterdam # Adjust the timezone to match your local timezone. You can find the full list of timezones here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. # Replace 'root_ca.crt' with your own Root CA certificate, then uncomment the line # NODE_EXTRA_CA_CERTS: /app/data/docker-tls/root_ca.crt MARIADB_HOST: ${HOST_DB} # Fill in the value in both the .env and stack.env files MARIADB_PORT: ${PORT_DB} # Fill in the value in both the .env and stack.env files MARIADB_NAME: ${NAME_DB} # Fill in the value in both the .env and stack.env files MARIADB_USER: ${USER_DB} # Fill in the value in both the .env and stack.env files MARIADB_PASSWORD: ${PASSWORD_DB} # Fill in the value in both the .env and stack.env files domainname: status.local # Customize this with your own domain, e.g., `status.local` to `status.your-fqdn-here.com`. hostname: status networks: uptime-kuma_net: ipv4_address: 172.19.3.3 ports: - "3001:3001/tcp" # HTTP security_opt: - no-new-privileges:true labels: com.uptime-kuma.description: "is an self-hosted monitoring tool that allows you to monitor uptime, status, and notifications for various services and domains." healthcheck: disable: false test: ["CMD", "extra/healthcheck"] interval: 10s timeout: 5s retries: 3 start_period: 10s start_interval: 5s uptime-kuma_socket-proxy: deploy: resources: limits: pids: 512 # Limits the number of processes and threads (fork bomb protection). # Read-only proxy for the Docker API. The app reaches Docker through this proxy instead of the socket. restart: unless-stopped logging: driver: "json-file" options: max-size: "1M" max-file: "2" stop_grace_period: 1m container_name: uptime-kuma_socket-proxy image: lscr.io/linuxserver/socket-proxy:3.4.9-r0-ls109@sha256:0d164a964d46a6981b97fd82809175f7348720f43db7b54856aebbfbfb3c35f2 pull_policy: if_not_present read_only: true tmpfs: - /run volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: TZ: Europe/Amsterdam # Adjust the timezone to match your local timezone. You can find the full list of timezones here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. CONTAINERS: 1 # Allow GET /containers (list and inspect). INFO: 1 # Allow GET /info, used to test the Docker host. POST: 0 # Read-only: only GET and HEAD requests reach Docker. hostname: uptime-kuma_socket-proxy networks: uptime-kuma_net: ipv4_address: 172.19.3.6 security_opt: - no-new-privileges:true labels: com.uptime-kuma.socket-proxy.description: "is a read-only Docker API proxy for Uptime Kuma."