Deploy Uptime-Kuma-Web-API using Docker Compose
mainYou can deploy both Uptime Kuma and the REST API wrapper together using Docker Compose. This setup ensures the API can communicate with the Kuma container over the internal Docker network.
Important Setup Step: To use the provided example, you must run Kuma first, create your Kuma username and password, and then run the compose file. This ensures the credentials provided in the environment variables match an existing user in Kuma.
version: "3.9"
services:
kuma:
container_name: uptime-kuma
image: louislam/uptime-kuma:latest
ports:
- "3001:3001"
restart: always
volumes:
- uptime-kuma:/app/data
api:
container_name: backend
image: medaziz11/uptimekuma_restapi
volumes:
- api:/db
restart: always
environment:
- KUMA_SERVER=http://kuma:3001
- KUMA_USERNAME=test
- KUMA_PASSWORD=123test.
- ADMIN_PASSWORD=admin
depends_on:
- kuma
ports:
- "8000:8000"
volumes:
uptime-kuma:
api: