You've already forked healthcheck
Добавлен healthcheck
All checks were successful
Build and push Docker image / build (push) Successful in 40s
All checks were successful
Build and push Docker image / build (push) Successful in 40s
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
# Используем стабильный образ Node.js на Alpine для минимального размера
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Устанавливаем зависимости
|
||||
COPY package*.json ./
|
||||
RUN npm install --production
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
# Копируем основной скрипт
|
||||
COPY server.js .
|
||||
|
||||
# Порт для Keepalived
|
||||
EXPOSE 8080
|
||||
|
||||
# Запускаем приложение
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD curl -f http://localhost:8080/ || exit 1
|
||||
|
||||
CMD [ "node", "server.js" ]
|
||||
Reference in New Issue
Block a user