-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure container is able to start up (#23)
Follow-up to #22
- Loading branch information
1 parent
780600e
commit bd5c142
Showing
5 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict'; | ||
|
||
const assert = require('assert'); | ||
|
||
const { fetchEndpointAsJson } = require('./server/lib/fetch-endpoint'); | ||
|
||
const config = require('./server/lib/config'); | ||
const basePort = config.get('basePort'); | ||
assert(basePort); | ||
|
||
const healthCheckUrl = `http://localhost:${basePort}/health-check`; | ||
|
||
(async () => { | ||
try { | ||
await fetchEndpointAsJson(healthCheckUrl); | ||
process.exit(0); | ||
} catch (err) { | ||
// eslint-disable-next-line no-console | ||
console.log(`Health check error: ${healthCheckUrl}`, err); | ||
process.exit(1); | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters