mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-23 06:19:49 -05:00
[docker healthcheck] use retries instead, longer start-period causes starting problem in Docker Swarm mode
This commit is contained in:
parent
dd283423ab
commit
1d05df6ec9
@ -24,7 +24,7 @@ RUN npm install --legacy-peer-deps && npm run build && npm prune
|
|||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
VOLUME ["/app/data"]
|
VOLUME ["/app/data"]
|
||||||
HEALTHCHECK --interval=600s --timeout=130s --start-period=300s CMD node extra/healthcheck.js
|
HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD node extra/healthcheck.js
|
||||||
CMD ["node", "server/server.js"]
|
CMD ["node", "server/server.js"]
|
||||||
|
|
||||||
FROM release AS nightly
|
FROM release AS nightly
|
||||||
|
@ -19,7 +19,7 @@ RUN npm install --legacy-peer-deps && npm run build && npm prune
|
|||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
VOLUME ["/app/data"]
|
VOLUME ["/app/data"]
|
||||||
HEALTHCHECK --interval=600s --timeout=130s --start-period=300s CMD node extra/healthcheck.js
|
HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD node extra/healthcheck.js
|
||||||
CMD ["node", "server/server.js"]
|
CMD ["node", "server/server.js"]
|
||||||
|
|
||||||
FROM release AS nightly
|
FROM release AS nightly
|
||||||
|
@ -11,7 +11,7 @@ if (process.env.SSL_KEY && process.env.SSL_CERT) {
|
|||||||
let options = {
|
let options = {
|
||||||
host: process.env.HOST || "127.0.0.1",
|
host: process.env.HOST || "127.0.0.1",
|
||||||
port: parseInt(process.env.PORT) || 3001,
|
port: parseInt(process.env.PORT) || 3001,
|
||||||
timeout: 120 * 1000,
|
timeout: 28 * 1000,
|
||||||
};
|
};
|
||||||
|
|
||||||
let request = client.request(options, (res) => {
|
let request = client.request(options, (res) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user