Comments (1)
Came across the same issue for the distroless images and solved it by creating a modified Docker image with a built-in node-based health check for Soketi:
- Create a health check script for Node.
// healthcheck.js
#!/usr/bin/env node
const http = require('node:http');
const options = {
hostname: 'localhost',
port: process.env.SOKETI_PORT || 6001,
path: '/',
method: 'GET'
};
http.request(options, res => {
let body = '';
res.on('data', chunk => {
body += chunk;
});
res.on('end', () => {
if (body === 'OK') {
process.stdout.write('We are healthy!');
process.exit(0);
} else {
process.stdout.write('Uh oh, we are not healthy!');
process.exit(1);
}
});
})
.on('error', () => {
process.stdout.write('Uh oh, we are not healthy!');
process.exit(1);
})
.end();
- Create a Dockerfile based off the distroless Soketi image:
# Dockerfile
FROM quay.io/soketi/soketi:1.6-16-distroless
COPY docker/healthcheck.js /app/
- Build the Docker image:
docker build -t soketi-with-healthcheck .
- After building and running the Docker image, you can perform the healthcheck by running:
docker exec -i -t soketi-with-healthcheck /nodejs/bin/node healthcheck.js
Or if you're deploying the Docker container in AWS ECS for example, define the healthcheck in your container task definition like this:
HealthCheck:
Command: [ "CMD", "/nodejs/bin/node", "healthcheck.js" ]
Interval: 5
Retries: 3
Timeout: 2
from soketi.
Related Issues (20)
- [REQUEST] Statistic Collection for Dashboard project (link inside) HOT 1
- soketi exec_curl error: "OpenSSL/1.1.1u: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure"
- [DOCUMENTATION] Docker tag 1-16-alpine does not work slash does not exist HOT 1
- [REQUEST] Heroku deployment example HOT 1
- the Soketi project is abandoned HOT 9
- [BUG] webhook Message event handler not implemented HOT 2
- configuration of ssl on server HOT 3
- How to install soketi in windows 11 HOT 9
- Sorry, you have been blocked HOT 1
- [BUG] dash.soketi.app is down (522) HOT 5
- Cannot read properties of undefined (reading 'includes') HOT 2
- [BUG] Cannot get users count for presence channels HOT 1
- [REQUEST] ability to use SSL for mysql HOT 3
- [REQUEST] Implement watchlist
- [REQUEST] Preventing down docker server
- [BUG] Socketi Dashboard Down HOT 1
- Has anyone managed to run Soketi on FreeBSD?
- The JS client connects but Pusher's official Java client does not.
- [BUG] Not found any messages saved in Redis when change adapter driver to redis
- [BUG] error stopped soketi in large number coneccion and High CPU usage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soketi.