fix healthcheck
This commit is contained in:
parent
5890b5e8ef
commit
6a6feade0c
|
@ -111,7 +111,6 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- PORTAL_URL=nginx
|
- PORTAL_URL=nginx
|
||||||
- HOSTNAME=health-check
|
- HOSTNAME=health-check
|
||||||
- NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
||||||
expose:
|
expose:
|
||||||
- 3100
|
- 3100
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
|
@ -5,7 +5,7 @@ async function uploadCheck(done) {
|
||||||
const time = process.hrtime();
|
const time = process.hrtime();
|
||||||
|
|
||||||
superagent
|
superagent
|
||||||
.post(`https://${process.env.PORTAL_URL}/skynet/skyfile`)
|
.post(`${process.env.PORTAL_URL}/skynet/skyfile`)
|
||||||
.attach("file", "package.json", "package.json")
|
.attach("file", "package.json", "package.json")
|
||||||
.end((err, res) => {
|
.end((err, res) => {
|
||||||
const statusCode = (res && res.statusCode) || (err && err.statusCode) || null;
|
const statusCode = (res && res.statusCode) || (err && err.statusCode) || null;
|
||||||
|
@ -22,7 +22,7 @@ async function uploadCheck(done) {
|
||||||
function downloadCheck(done) {
|
function downloadCheck(done) {
|
||||||
const time = process.hrtime();
|
const time = process.hrtime();
|
||||||
|
|
||||||
superagent.get(`https://${process.env.PORTAL_URL}`).end((err, res) => {
|
superagent.get(`${process.env.PORTAL_URL}`).end((err, res) => {
|
||||||
const statusCode = (res && res.statusCode) || (err && err.statusCode) || null;
|
const statusCode = (res && res.statusCode) || (err && err.statusCode) || null;
|
||||||
|
|
||||||
done({
|
done({
|
||||||
|
|
Reference in New Issue