mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-05 09:41:27 +03:00
feat(docker): add non-root user, labels, and healthcheck (closes #433)
Now works with Pterodactyl.
This commit is contained in:
@@ -122,7 +122,11 @@ module.exports = async client => {
|
||||
: responseTime >= 10
|
||||
? '&e'
|
||||
: '&a') + responseTime + 'ms';
|
||||
const level = req.routerPath === '/*' ? 'verbose' : 'info';
|
||||
const level = req.routerPath === '/status'
|
||||
? 'debug'
|
||||
: req.routerPath === '/*'
|
||||
? 'verbose'
|
||||
: 'info';
|
||||
client.log[level].http(short(`${req.id} ${req.ip} ${req.method} ${req.routerPath ?? '*'} &m-+>&r ${status}&b in ${responseTime}`));
|
||||
if (!req.routerPath) client.log.verbose.http(`${req.id} ${req.method} ${req.url}`);
|
||||
done();
|
||||
|
6
src/routes/status.js
Normal file
6
src/routes/status.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports.get = () => ({
|
||||
handler: async (req, res) => {
|
||||
const { status } = res.context.config.client.ws;
|
||||
res.code(status === 0 ? 200 : 425).send(status);
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user