> For AI agents: the complete documentation index is available at https://www.tteam.icu/llms.txt, the full documentation bundle is available at https://www.tteam.icu/llms-full.txt.

# gotify

Gotify 是一个轻量的自建推送服务，适合接收脚本任务、监控告警和自动化流程产生的通知。

## Gotify

[gotify开源地址](https://github.com/gotify/server)

[igotify开源地址](https://github.com/androidseb25/iGotify-Notification-Assistent)

:::tip
如果需要 iOS 推送，需要额外部署 `iGotify` 并完成对应客户端配置。
:::

```yml file="./gotify/docker-compose.yml" title="docker-compose.yml"
---
services:
  gotify:
    image: gotify/server
    restart: unless-stopped
    networks:
      - net
    ports:
      - "8680:80"
    environment:
      GOTIFY_DEFAULTUSER_PASS: 'admin'
      GOTIFY_SERVER_PORT: 8680
      TZ: "Asia/Shanghai"
    volumes:
      - ./data:/app/data

  igotify:
    container_name: igotify
    hostname: igotify
    image: ghcr.io/androidseb25/igotify-notification-assist:latest
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    pull_policy: always
    networks:
      - net
    ports:
      - "8681:8080"
    healthcheck:
      test: [ "CMD", "curl", "-f", "http://localhost:8080/Version" ]
      interval: "3s"
      timeout: "3s"
      retries: 5
    volumes:
      - ./igotify-data:/app/data

networks:
  net:

```

## alertmanager\_gotify\_bridge

将 Alertmanager webhook 转换为 Gotify 消息格式

[开源地址](https://github.com/androidseb25/iGotify-Notification-Assistent)

部署桥接脚本后，Alertmanager 可以继续使用 webhook 通知方式，再由脚本把告警内容转成 Gotify 消息。

```shell file="./gotify/gotify-bridge.sh" title="gotify-bridge"
#!/bin/bash

docker rm -f gotify-bridge

docker run -d \
--name gotify-bridge \
--network host \
-e GOTIFY_ENDPOINT="http://127.0.0.1:8680/message" \
-e GOTIFY_TOKEN="xxx" \
-e PORT=8081 \
ghcr.io/druggeri/alertmanager_gotify_bridge:latest
```
