{"id":17617369,"url":"https://github.com/echgo/echgo","last_synced_at":"2025-04-30T18:11:50.715Z","repository":{"id":39635919,"uuid":"454360566","full_name":"echgo/echgo","owner":"echgo","description":"The easy way to send notifications via txt, json or xml file.","archived":false,"fork":false,"pushed_at":"2024-08-30T09:53:21.000Z","size":657,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T18:11:41.296Z","etag":null,"topics":["bash","discord","docker","go","golang","gotify","hacktoberfest","json","matrix","notifications","osticket","pushover","slack","smtp","telegram","text","twillo","webhook","xml","zendesk"],"latest_commit_sha":null,"homepage":"https://echgo.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/echgo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-01T11:25:38.000Z","updated_at":"2024-08-30T09:52:37.000Z","dependencies_parsed_at":"2023-01-21T02:46:13.884Z","dependency_job_id":"9fb617ea-9e91-4da2-bcd1-eeade7c92397","html_url":"https://github.com/echgo/echgo","commit_stats":{"total_commits":349,"total_committers":3,"mean_commits":"116.33333333333333","dds":"0.10888252148997135","last_synced_commit":"28a06c24bbbb012926d1180eddf8b4b95a4735f8"},"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echgo%2Fechgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echgo%2Fechgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echgo%2Fechgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echgo%2Fechgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/echgo","download_url":"https://codeload.github.com/echgo/echgo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251758173,"owners_count":21638989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","discord","docker","go","golang","gotify","hacktoberfest","json","matrix","notifications","osticket","pushover","slack","smtp","telegram","text","twillo","webhook","xml","zendesk"],"created_at":"2024-10-22T19:13:07.740Z","updated_at":"2025-04-30T18:11:50.670Z","avatar_url":"https://github.com/echgo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cbr\u003e\u003cbr\u003e\u003cimg src=\"https://raw.githubusercontent.com/echgo/logo/main/logo.svg\" alt=\"echGo\" width=\"200\" /\u003e\n\n# echGo\n\n\u003c/div\u003e\n\n[![Go Test](https://github.com/echgo/echgo/actions/workflows/go-test.yml/badge.svg)](https://github.com/echgo/echgo/actions/workflows/go-test.yml) [![Docker Test](https://github.com/echgo/echgo/actions/workflows/docker-test.yml/badge.svg)](https://github.com/echgo/echgo/actions/workflows/docker-test.yml) [![Docker Build](https://github.com/echgo/echgo/actions/workflows/docker-build.yml/badge.svg)](https://github.com/echgo/echgo/actions/workflows/docker-build.yml) [![Pull Request Labels](https://github.com/echgo/echgo/actions/workflows/pull-request-labels.yml/badge.svg)](https://github.com/echgo/echgo/actions/workflows/pull-request-labels.yml) [![CompVer](https://github.com/echgo/echgo/actions/workflows/compver.yml/badge.svg)](https://github.com/echgo/echgo/actions/workflows/compver.yml) [![Dependabot Updates](https://github.com/echgo/echgo/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/echgo/echgo/actions/workflows/dependabot/dependabot-updates)\n\nThis small Docker project is the easiest way to send notifications directly via .txt, .json or .xml files to services like: [Gotify](https://gotify.net/), [Pushover](https://pushover.net/), [Matrix](https://matrix.org/), [Telegram](https://telegram.org/), [Discord](https://discord.com/), [Slack](https://slack.com/), [Trello](https://trello.com/de), [Zendesk](https://www.zendesk.de/), [osTicket](https://osticket.com/), [twillo](https://www.twilio.com/), SMTP (Email) or Webhook. \n    \n## Quick start\n\nHere you can find the instructions on how to set up the Docker container and define the files so that they can be read in correctly.\n\n### Create the configuration files\n\nFirst, we start the Docker container to create the configuration file. For this you can use the following command.\n\n```console\ndocker run --name echgo-init -d --rm \\\n    -v /etc/echgo/configuration:/app/files/configuration \\\n    echgo/echgo:latest\n```\n\nIf the container was started, then the directory `/etc/echgo/configuration` is created. Here you will find the configuration for the different communication paths. Please fill in and save this as required. If you want to adjust the configuration. You do not have to restart the Docker container again. The software reads the configuration once before each run, so it is always up-to-date. [Here](https://github.com/echgo/echgo/wiki/Configuration-File#demo-data) you find once the file with demo data, so that you see, how the file looks. If you need more information about the individual keys and tokens, you can find them [here](https://github.com/echgo/echgo/wiki/Environment-Variables#channel-variables) in the channel variables.\n\nThe container is stopped automatically and removed.\n\n### Start the service\n\nNow we can start the service directly. To do this, please run the following command once.\n\n```console\ndocker run --name echgo -d --restart always \\\n    -v /etc/echgo/configuration:/app/files/configuration \\\n    -v /var/lib/echgo/notification:/app/files/notification \\\n    echgo/echgo:latest\n```\n\nNow the service should run. With the command we map once the configuration file and the location of the notifications.\n\n### Further adjustments\n\n#### Adjust interval\n\nIf you like to adjust the interval of 15 seconds, you can do this with the following variable `INTERVAL`. This must be of type `integer`, otherwise it will not be taken into account. The whole thing looks like this.\n\n```console\ndocker run --name echgo -d --restart always \\\n    -e INTERVAL=5 \\\n    -v /etc/echgo/configuration:/app/files/configuration \\\n    -v /var/lib/echgo/notification:/app/files/notification \\\n    echgo/echgo:latest\n```\n\nWith these settings, the service now reads the notifications every 5 seconds.\n\n#### Use environments\n\nIf you want to use environments instead of the json configuration, you can force this with the variable `USE_ENVIRONMENT`. This value is a `boolean`. This is the way json configuration is taken no longer.\n\n```console\ndocker run --name echgo -d --restart always \\\n    -e USE_ENVIRONMENT=true \\ \n    -v /var/lib/echgo/notification:/app/files/notification \\\n    echgo/echgo:latest\n```\n\nNow you can use the following variables for the different services. If a service is running notification file but has no access data stored, the notification will not be executed. A list of all variables can be found [here](https://github.com/echgo/echgo/wiki/Environment-Variables#channel-variables).\n\n### Create notification\n\nNow we create a notification to be sent to different channels. You can also enter only one channel. How these notification files are created later is up to you. With a bash script or from another program does not matter.\n\nThe only important thing is that the file is placed in this folder `/var/lib/echgo/notification`. The name of the file does not matter. It only matters that the file extension and the file format are correct. Currently, we can read the following formats: `.txt`, `.json` \u0026 `.xml`. \n\nYou can store the following channels in the file, if they are configured: `gotify`, `pushover`, `matrix`, `telegram`, `discord`, `slack`, `trello`, `zendesk`, `osticket`, `twillo`, `smtp` \u0026 `webhook`. These are always specified in an array. That means you can address one or more channels with one notification file. Now let's look at the currently available file formats and how you can configure them.\n\n#### TXT file\n\nNow let's have a look at an example .txt file. The name of the file can always be freely chosen. It is only important that the data are set per line and that these are stored as key value pairs.\n\nNotification channels can be listed comma separated. If you want to use only one channel, you don't have to use a comma.\n\n```text\nchannels=gotify,telegram\nheadline=echGo\nmessage=This is a test message from a txt file.\n```\n\n#### JSON file\n\nHere you can find an example for a .json file. Here you can also enter several or only one channel. The structure of the file must be followed please. If you want to know more about JSON, you can find the official site [here](https://www.json.org/json-en.html).\n\n```json\n{\n    \"channels\": [\n        \"gotify\",\n        \"matrix\",\n        \"zendesk\"\n    ],\n    \"headline\": \"Nice headline\",\n    \"message\": \"This is a test message from a json file.\"\n}\n```\n\n#### XML file\n\nThe file type .xml can also be used. The structure of the file looks as follows. If you need to XML, you can find it [here](https://www.xml.com/).\n\n```xml\n\u003cdata\u003e\n    \u003cchannels\u003e\n        \u003ctype\u003egotify\u003c/type\u003e\n        \u003ctype\u003ediscord\u003c/type\u003e\n    \u003c/channels\u003e\n    \u003cheadline\u003eechGo\u003c/headline\u003e\n    \u003cmessage\u003eThis is a test message from a xml file.\u003c/message\u003e\n\u003c/data\u003e\n```\n\nNow echGo reads the files every 15 seconds and sends them to the specified channels. It is also possible to read in several files of different types at the same time.\n\n## Run the service with updates \u0026 docker-compose\n\nIf you want to get updates for echGo automated, then this is surely exciting for you. Here we use [watchtower](https://github.com/containrrr/watchtower/) to update the container. Watchtower is defined so that it only updates containers with the label `com.centurylinklabs.watchtower.enable=true`. That means you don't have to worry about your other containers.\n\nIn order for the echGo service to start properly, you must either do [this](https://github.com/echgo/echgo#create-the-configuration-files) step once before.\n\nNow you can create a docker-compose.yml and start it via ssh in the upload directory with the command `docker-compose up -d` order from version 2 with `docker compose up -d`. Or you can copy the code from here.\n\n```yaml\nversion: \"3.9\"\nservices:\n    watchtower:\n        container_name: watchtower\n        volumes:\n            - /var/run/docker.sock:/var/run/docker.sock\n        expose:\n            - 8080\n        restart: always\n        image: containrrr/watchtower:latest\n        command: --cleanup --include-restarting --rolling-restart --include-stopped --label-enable --interval 3600\n    echgo:\n        container_name: echgo\n        environment:\n            - TZ=Europe/Berlin\n        volumes:\n            - /etc/echgo/configuration:/app/files/configuration\n            - /var/lib/echgo/notification:/app/files/notification\n        labels:\n            - com.centurylinklabs.watchtower.enable=true\n        depends_on:\n            watchtower:\n              condition: service_started\n        restart: always\n        image: echgo/echgo:latest\n```\n\n[Here](https://docs.docker.com/compose/reference/) you can find a list of all docker-compose commands.\n\nIf you eventually want to run multiple servers with echgo, then this might still be interesting for you. Here I have set up a NFS server on which the echgo configuration file is located and create a mount on this server in the volume `echgo_configuration` and use this for the echgo container. A guide for NFS servers and how to use them can be found [here](https://ubuntu.com/server/docs/service-nfs). But please remember to enter the IP of the client server at the NSF server before you start the services via docker compose file.\n\n```yaml\nversion: \"3.9\"\nservices:\n    watchtower:\n        container_name: watchtower\n        volumes:\n            - /var/run/docker.sock:/var/run/docker.sock\n        expose:\n            - 8080\n        restart: always\n        image: containrrr/watchtower:latest\n        command: --cleanup --include-restarting --rolling-restart --include-stopped --label-enable --interval 3600\n    echgo:\n        container_name: echgo\n        environment:\n            - TZ=Europe/Berlin\n        volumes:\n            - /var/lib/echgo/notification:/app/files/notification\n            - echgo_configuration:/app/files/configuration\n        labels:\n            - com.centurylinklabs.watchtower.enable=true\n        depends_on:\n          watchtower:\n            condition: service_started\n        restart: always\n        image: echgo/echgo:latest\nvolumes:\n    echgo_configuration:\n        driver: local\n        driver_opts:\n            type: nfs\n            o: nfsvers=4,addr=1.2.3.4,ro,async\n            device: :/mnt/docker/echgo\n```\n\nIf you want to use this docker-compose, just copy the part and save it in a docker-compose.yml file. Then you can start directly with it.\n\n## Planned channels\n\nHere you will find channels we have planned or already implemented. If you think of another one, please send it to us.\n\n- Microsoft Teams\n- WhatsApp Business\n- HubSpot\n\n## Added channels\n\nHere you can find all added channels and in which version they are added.\n\n- Matrix - _Added in version v0.0.3_\n- Trello - _Added in version v0.0.4_\n- Discord - _Added in version v0.0.6_\n- Zendesk - _Added in version v0.0.7_\n- osTicket - _Added in version v0.1.2_\n- Slack - _Added in version v0.1.3_\n- twilio - _Added in version v1.0.3_\n- Pushover - _Added in version v1.1.7_ \n\n## Special thanks\n\nThanks to [JetBrains](https://github.com/JetBrains) for supporting me with this and other [open source projects](https://www.jetbrains.com/community/opensource/#support).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechgo%2Fechgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fechgo%2Fechgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechgo%2Fechgo/lists"}