67 lines
1.4 KiB
Markdown
67 lines
1.4 KiB
Markdown
# Uptime Kuma Deployment
|
|
|
|
Docker Compose deployment for [Uptime Kuma](https://github.com/louislam/uptime-kuma).
|
|
|
|
This repo can run by itself on port `3001` and can also be reverse proxied by the sibling `caddy-deployment` repo over the shared `caddy_proxy` Docker network.
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
git clone http://git.amiirkhl.ir/interanet/uptime-kuma-deployment.git
|
|
cd uptime-kuma-deployment
|
|
chmod +x run.sh
|
|
./run.sh
|
|
```
|
|
|
|
The first run creates `.env` from `.env.example`.
|
|
|
|
## Standalone Access
|
|
|
|
By default Uptime Kuma is available directly at:
|
|
|
|
```text
|
|
http://SERVER_IP:3001
|
|
```
|
|
|
|
Change the host port in `.env` if needed:
|
|
|
|
```env
|
|
UPTIME_KUMA_HOST_PORT=3001
|
|
```
|
|
|
|
## Caddy Integration
|
|
|
|
The compose file attaches `uptime-kuma` to the external Docker network named `caddy_proxy`.
|
|
|
|
`run.sh` creates that network if it does not already exist, so the stack can start even before `caddy-deployment` is running.
|
|
|
|
The sibling `caddy-deployment/config/caddy/Caddyfile` includes:
|
|
|
|
```caddyfile
|
|
uptime.amiirkhl.ir {
|
|
import {$CADDY_TLS_MODE:custom_tls}
|
|
reverse_proxy uptime-kuma:3001
|
|
}
|
|
```
|
|
|
|
Start or reload Caddy after starting Uptime Kuma:
|
|
|
|
```bash
|
|
cd ../caddy-deployment
|
|
docker compose up -d
|
|
docker compose exec caddy caddy reload --config /etc/caddy/Caddyfile
|
|
```
|
|
|
|
## Data
|
|
|
|
Uptime Kuma data is stored in the Docker volume `uptime-kuma-deployment_uptime_kuma_data`.
|
|
|
|
Useful commands:
|
|
|
|
```bash
|
|
docker compose logs -f
|
|
docker compose pull
|
|
docker compose up -d
|
|
docker compose down
|
|
```
|