xtream proxy
Build and Push Docker Images / build-and-push (push) Failing after 20s

This commit is contained in:
2026-04-09 21:06:18 +02:00
parent 57e67d2366
commit 630ae66db1
7 changed files with 1120 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
FROM node:22-alpine
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
COPY server.js ./
RUN addgroup -g 1001 -S nodejs \
&& adduser -S nodejs -u 1001 \
&& chown -R nodejs:nodejs /app
USER nodejs
EXPOSE 8080
ENV LISTEN_PORT=8080
ENV HOSTS_FILE=/config/hosts.txt
ENV CHECK_INTERVAL_SEC=30
ENV PING_TIMEOUT_MS=8000
ENV HEALTH_PATH=/
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD node -e "require('http').get('http://127.0.0.1:'+(process.env.LISTEN_PORT||8080)+'/health',(r)=>{let d='';r.on('data',c=>d+=c);r.on('end',()=>{try{process.exit(JSON.parse(d).ok?0:1)}catch{process.exit(1)}})}).on('error',()=>process.exit(1))"
CMD ["npm", "start"]