···1111* A running ntfy instance ([installation docs](https://docs.ntfy.sh/))
1212* A topic to push to
13131414-## Komodo Resource TOML
1414+## Deploying
1515+1616+Use **either** of the methods below.
1717+1818+### Komodo Resource Sync
1919+2020+<details>
2121+2222+Create a [Resource Sync](https://komo.do/docs/sync-resources) with the TOML configuration below to
2323+2424+* create the [Stack](https://komo.do/docs/resources#stack) to run deploy-ntfy-alerter
2525+* add the Ntfy User/Password or Token [Variable](https://komo.do/docs/variables) and
2626+* setup the [Alerter](https://komo.do/docs/resources#alerter) + configuration
2727+2828+Steps:
2929+3030+* Open Komodo Dashboard -> Syncs -> **New Resource Sync**
3131+* Choose Mode -> UI Defined
3232+ * Toggle the following to active:
3333+ * Managed
3434+ * Include Sync Resources
3535+ * Include Sync Variables
3636+3737+Add the below configuration to **Resource File** field and then modify variables for your environment (NTFY_URL, endpoint.params.url, etc...)
15381639```toml
1740[[stack]]
···85108enabled = true
86109endpoint.type = "Custom"
87110endpoint.params.url = "http://ntfy-alerter-ip:7000"
8888-```111111+```
112112+113113+**Save** the sync and then **Execute Sync** to create the Alerter.
114114+115115+</details>
116116+117117+## Manual setup
118118+119119+<details>
120120+121121+Create a new [**Stack**](https://komo.do/docs/resources#stack) with the following for `compose.yaml` file.
122122+123123+```yaml
124124+services:
125125+ komodo-ntfy:
126126+ image: foxxmd/komodo-ntfy-alerter:latest
127127+ restart: unless-stopped
128128+ env_file:
129129+ - ./.env
130130+ ports:
131131+ - "7000:7000"
132132+```
133133+134134+Add the following to the Stack -> Config -> Environment section:
135135+136136+```ini
137137+## Required
138138+139139+## Your ntfy instance URL
140140+NTFY_URL = https://ntfy.example.com
141141+142142+## Topic to be used for for Komodo
143143+NTFY_TOPIC = MyTopic
144144+145145+## Optional
146146+147147+## Auth
148148+149149+## https://docs.ntfy.sh/publish/#username-password
150150+#NTFY_USER=[[NTFY_USER]]
151151+#NTFY_PASSWORD=[[NTFY_PASSWORD]]
152152+## https://docs.ntfy.sh/publish/#access-tokens
153153+#NTFY_TOKEN=[[NTFY_TOKEN]]
154154+155155+# Below need to add to `compose.yaml` as well
156156+157157+## Set the ntfy Priority level based on Komodo alert severity
158158+#NTFY_OK_PRIORITY=3
159159+#NTFY_WARNING_PRIORITY=5
160160+#NTFY_CRITICAL_PRIORITY=8
161161+162162+# Set whether to include Komodo Severity Level in notification title
163163+#LEVEL_IN_TITLE=true
164164+165165+# Prefixes messages with a checkmark when the Alert is in the 'Resolved' state
166166+#INDICATE_RESOLVED=true
167167+168168+# Filter if an alert is pushed based on its Resolved status
169169+# * leave unset to push all alerts
170170+# * otherwise, alerts will only be pushed if Alert is one of the comma-separated states set here
171171+#ALLOW_RESOLVED_TYPE=resolved,unresolved
172172+173173+## Delay alerts with below types for X milliseconds
174174+## and cancel pushing alert if it is resolved within that time
175175+#UNRESOLVED_TIMEOUT_TYPES=ServerCpu,ServerMem
176176+#UNRESOLVED_TIMEOUT=2000
177177+```
178178+179179+Make sure to replace placeholder values. `[[NTFY_USER]]` is a Komodo [Variable](https://komo.do/docs/variables).
180180+181181+After deploying the Stack create a new [Alerter](https://komo.do/docs/resources#alerter)
182182+183183+* **Endpoint:** `Custom`
184184+ * In the Endpoint field set the IP:PORT of the `komodo-ntfy-alerter` stack you created IE `http://192.168.YOUR.IP:7000`
185185+* Optionally, set any **Alert Types** you may need
186186+187187+**Save** the Alerter and then **Test Alerter** to make sure everything is ready to use.
188188+189189+</details>