
You have to define these ENV VARS in order to connect to your KUMA server.
KUMA_SERVER=<your_kuma_server>
KUMA_USERNAME=<your_kuma_username>
KUMA_PASSWORD=<your_kuma_password>
ADMIN_PASSWORD=<your admin password so you can connect with via the api>
You have to define your ADMIN_PASSWORD or you wont be able to connect to your rest api.
You will connect with those credentials:
username = admin
password = <ADMIN_PASSWORD>
You can simply create a docker compose file like this :
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:
- ./db:/db:rwx
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:
TOKEN=$(curl -X -L 'POST' -H 'Content-Type: application/x-www-form-urlencoded' --data 'username=admin&password=admin' http://127.0.0.1:8000/login/access-token/ | jq -r ".access_token")
curl -L -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://127.0.0.1:8000/monitors/
Content type
Image
Digest
sha256:2f5d711ad…
Size
37 MB
Last updated
over 3 years ago
docker pull nikoogle/uptimekuma_restapi