{"id":18841294,"url":"https://github.com/dmhendricks/docker-socketio-relay","last_synced_at":"2026-01-30T09:30:17.859Z","repository":{"id":88694337,"uuid":"237702585","full_name":"dmhendricks/docker-socketio-relay","owner":"dmhendricks","description":"Dockerfile for a simple Node.js server to relay messages to Socket.IO clients.","archived":false,"fork":false,"pushed_at":"2020-02-02T03:15:32.000Z","size":20,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T12:56:34.470Z","etag":null,"topics":["browser-notifications","docker-image","nodejs-server","socket-io","socket-io-client","socketio-messaging","socketio-server","websockets"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/hendridm/socketio-relay","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmhendricks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-02T01:29:55.000Z","updated_at":"2024-02-02T15:05:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"2fa17fdd-d555-46de-b40d-fb2019233964","html_url":"https://github.com/dmhendricks/docker-socketio-relay","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmhendricks%2Fdocker-socketio-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmhendricks%2Fdocker-socketio-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmhendricks%2Fdocker-socketio-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmhendricks%2Fdocker-socketio-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmhendricks","download_url":"https://codeload.github.com/dmhendricks/docker-socketio-relay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239780122,"owners_count":19695734,"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":["browser-notifications","docker-image","nodejs-server","socket-io","socket-io-client","socketio-messaging","socketio-server","websockets"],"created_at":"2024-11-08T02:50:41.907Z","updated_at":"2026-01-30T09:30:17.812Z","avatar_url":"https://github.com/dmhendricks.png","language":"HTML","readme":"[![Author](https://img.shields.io/badge/author-Daniel%20M.%20Hendricks-lightgrey.svg?colorB=9900cc )](https://www.danhendricks.com/?utm_source=github.com\u0026utm_medium=campaign\u0026utm_content=button\u0026utm_campaign=dmhendricks%2Fdocker-socketio-relay)\n[![License](https://img.shields.io/github/license/dmhendricks/docker-socketio-relay.svg)](https://github.com/dmhendricks/docker-socketio-relay/blob/master/LICENSE)\n[![DigitalOcean](https://img.shields.io/badge/hosting-Digital%20Ocean-green.svg?style=flat-square\u0026label=hosting\u0026colorB=0152FF)](https://m.do.co/t/8a88362f5683?utm_source=github.com\u0026utm_medium=campaign\u0026utm_content=referral\u0026utm_campaign=dmhendricks%2Fdocker-socketio-relay)\n[![Twitter](https://img.shields.io/twitter/url/https/github.com/dmhendricks/docker-socketio-relay.svg?style=social)](https://twitter.com/danielhendricks)\n[![BrowserStack](https://img.shields.io/static/v1?style=social\u0026label=BrowserStack\u0026message=Passed\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAGXRFWHRTb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3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhdfVWUAAAGAUExURXjIMP/Rhf/Xn4mHhwpRXnrY8CIXFv41Sk68OACv2QC+6svIAP5oEAC+6H7ToKa3nP9fF//AT/+tfPjVzpTPHf+6Rf1GLcbVAJDd8P/9+v/qyf/EY/+mNXHLidKyF126Mv/26anm8/+8TP/68P1jAFHO8lPAYu+SDqrh7v+xR/0eOgC/rIGvM7SvI9qKjAC+6lG5wf+SM/+2mOGnGf8NMgCcvLLEw5OZOv0yMfvARRfD7v+VSf9lZ/9mOqTs9lvAQ/+EK/+VY7Hr/f+cN0+7Lb2FMuqFG7tuOv9jEOCLLP93JKzj+ZDYwwC9s2LLrQB8k/9wEv+4R/9oD5/g1b3iAACtygCJo//w6MnHyPM5M+h3NuVyfcLPZP9MWKOYXMevu/+Xn5HG06nWAwDG8pzn6//lsZ/l85rik/+def/38fNoILPS3/1tF/+3Zf+sROmuICWPq3edprrG0VTW26jn/EhteD7CN9ibbgC8t/96NPmLQIjPY/9CKSQfIP///////+tAimMAAACAdFJOU/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AOAVLZwAAAj9JREFUeNpU0vtb0lAYB/CzCTgeDrQpGwyUyzZwwwyBmTRNELwgkYpQZkUXumktyrJ13eFf9z0CZd8ftufZZ9/znPOcFw1HIWezp+u9Xm/9xaw8nASNXsczfNk0c2VJOjGni2fXkRQ1KWeWdxKBSCSS2DuZZslflDepPX76LrS/P/+7343slWfkMRJque+djGXlIcuo301IH+URFjU+Z97ayAAEIfl8NtxN3GUIxWMNS+aTDS/QysHBij8YXOTC3b21N4DkFIrTH95alt/j+nw+z0owmE32A78UdYhS2JZg0aiV9/hc1zc1C7q4hbolgx0ilgd8vuG1HoK5rkxcT/B+kusHDEFGm5ot5b6kvZbnCh9Nua7/R5ILR9piDP3EVxgdowtPPzRR5I7IIpvi7bSeGSPEvzhCBjUp3rjQo5/H6PO8mt8CbCtxuixvPnut695J1f+1wnHhgAG4pmG7vBu6p6ej367O+cALRa7/SQQsahjzJ8kWaPrl+fmy9yIEVgnUBdhQ7BBj+8+uE9KBa7WaTntcf2EgwFHkAlSxtOpkQ61OpxWqUAuXqoKiyIgwUMVHoFtcpcJRclAJG7AqQUN1DlPlt5OO44A4laUFvi4oYgqujLB1qrjxfnv1JmRp54gvgMGowGXL8blDnpYbDfpPg7dpLy6PZkgVjCrW8Cg8rhpggjqZPjUuGoWmDWQ3CwOB9tR/cyuzoqC0B4OBoVASWfn6UJMUo4gAVBQmRf6beGA1xsQVJc7EVDL5dinAAO2UucfjcPEkAAAAAElFTkSuQmCC)](https://browserstack.com/?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=link\u0026utm_campaign=dmhendricks%2Fdocker-socketio-relay)\n\n# Simple Message Relay Server\n\nA simple [Node.js](https://nodejs.org/) message relay for Docker for transmitting to [Socket.IO](https://socket.io/) clients.\n\n1. Run the Docker service.\n2. Create a listener on the client, such as a [web page](https://github.com/dmhendricks/docker-socketio-relay/blob/master/demo.html).\n3. Send messages using cURL or your favorite REST client.\n\nFor more information, see my [nodejs-simple-message-relay](https://github.com/dmhendricks/nodejs-simple-message-relay/) example and [screenshot](https://github.com/dmhendricks/nodejs-simple-message-relay/blob/master/README.md#screenshot).\n\n## Deployment\n\nIssue the following command to run in Docker:\n\n```bash\ndocker run -p 3000:3000 --name socketio-relay -e API_KEY=MY_SECRET_API_KEY hendridm/socketio-relay\n```\n\nSee [Client Side Example Code](https://github.com/dmhendricks/nodejs-simple-message-relay/wiki/Client-Side-Example-Code) or [demo.html](https://github.com/dmhendricks/docker-socketio-relay/blob/master/demo.html) for an example of using the Socket.IO browser client to receive messages.\n\n### Environmental Variables\n\n- `API_KEY` - The API key required to send messages to clients.\n- `DEBUG` - Add `-e DEBUG=1` to display incoming messages to the console. \n\n## Usage\n\nOnce you have to service running and one or more clients connected, you can send messages to them using [your favorite REST client](https://www.getpostman.com/?utm_source=github.com\u0026utm_medium=campaign\u0026utm_content=referral\u0026utm_campaign=dmhendricks%2Fdocker-socketio-relay). You can send any data you like as long as it's in JSON. For example, to send a message to the included [demo.html](https://github.com/dmhendricks/docker-socketio-relay/blob/master/demo.html), you could issue the following command:\n\n```bash\ncurl --location --request POST 'http://localhost:3000/socket/my-socket-name?api_key=MY_SECRET_API_KEY' \\\n    --header 'Content-Type: application/json' \\\n    --data-raw '{ \"message\": \"Hello World!\" }'\n```\n\nNote that \"my-socket-name\" in the endpoint above must match the name of the socket that you are listening to in the client (see [demo.html](https://github.com/dmhendricks/docker-socketio-relay/blob/master/demo.html)). In this way, you can set different listeners and send different messages to different sockets.\n\n[![Analytics](https://ga-beacon.appspot.com/UA-126205765-1/dmhendricks/docker-socketio-relay?flat)](https://ga-beacon.appspot.com/?utm_source=github.com\u0026utm_medium=campaign\u0026utm_content=button\u0026utm_campaign=dmhendricks%2Fdocker-socketio-relay)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmhendricks%2Fdocker-socketio-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmhendricks%2Fdocker-socketio-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmhendricks%2Fdocker-socketio-relay/lists"}