mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 08:01:02 -04:00
fix bin folder and workflows as far its possible
cleanup of dockerfile changed paths of scripts add lock file fix working directory for workflows fix windows bin fix travis (is travis used anyway?) fix package refs remove pnpm-lock file in root as these conflicts with the docker volume setup optimize comments use install again refactor prod image call to run fix --workspace can only be used inside a workspace correct comment try fix pipeline try fix pipeline for upgrade-from-latest-release install all deps smaller adjustments save update dockerfile remove workspace command fix run test command start repair latest release workflow start repair latest release workflow start repair latest release workflow further repairs
This commit is contained in:
parent
c78c83da35
commit
366339355b
75 changed files with 160 additions and 193 deletions
26
bin/etherpad-healthcheck
Executable file
26
bin/etherpad-healthcheck
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
// Checks the health of Etherpad by visiting http://localhost:9001/health. Returns 0 on success, 1
|
||||
// on error as required by the Dockerfile HEALTHCHECK instruction.
|
||||
|
||||
'use strict';
|
||||
|
||||
// As of v14, Node.js does not exit when there is an unhandled Promise rejection. Convert an
|
||||
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
|
||||
process.on('unhandledRejection', (err) => { throw err; });
|
||||
|
||||
const assert = require('assert').strict;
|
||||
const superagent = require('superagent');
|
||||
|
||||
(async () => {
|
||||
const res = await superagent.get('http://localhost:9001/health')
|
||||
.accept('application/health+json')
|
||||
.buffer(true)
|
||||
.parse(superagent.parse['application/json']);
|
||||
assert(res.ok, `Unexpected HTTP status: ${res.status}`);
|
||||
assert.equal(res.type, 'application/health+json');
|
||||
const {body: {status} = {}} = res;
|
||||
assert(status != null);
|
||||
assert.equal(typeof status, 'string');
|
||||
assert(['pass', 'ok', 'up'].includes(status.toLowerCase()), `Unexpected status: ${status}`);
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue