mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Update healthcheck to work with PORT variable
This commit is contained in:
parent
fb845c3e03
commit
36d1a9c738
@ -54,9 +54,10 @@ COPY --link /public ./public
|
|||||||
COPY --link --from=builder /app/.next/standalone ./
|
COPY --link --from=builder /app/.next/standalone ./
|
||||||
COPY --link --from=builder /app/.next/static/ ./.next/static/
|
COPY --link --from=builder /app/.next/static/ ./.next/static/
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
ENV PORT='3000'
|
||||||
|
|
||||||
HEALTHCHECK --interval=12s --timeout=12s --start-period=30s \
|
HEALTHCHECK --interval=12s --timeout=12s --start-period=30s \
|
||||||
CMD node ./healthcheck.js
|
CMD node ./healthcheck.js
|
||||||
|
|
||||||
EXPOSE 3000
|
|
||||||
ENV PORT 3000
|
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
var http = require("http");
|
var http = require("http");
|
||||||
|
|
||||||
|
const PORT = process.env.PORT || "3000";
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
host: "localhost",
|
host: "localhost",
|
||||||
port: "3000",
|
port: PORT,
|
||||||
timeout: 2000,
|
timeout: 2000,
|
||||||
};
|
};
|
||||||
var request = http.request(options, (res) => {
|
var request = http.request(options, (res) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user