Use APP_PORT consistently

This commit is contained in:
2026-05-07 16:25:29 -04:00
parent b57e1c7906
commit 62d82f5344
6 changed files with 15 additions and 12 deletions

View File

@@ -3,15 +3,14 @@ FROM node:24-alpine
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3000
ENV APP_PORT=8787
COPY package.json ./
COPY index.html styles.css game.js server.js ./
EXPOSE 3000
EXPOSE 8787
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "fetch('http://127.0.0.1:' + (process.env.PORT || 3000) + '/healthz').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"
CMD node -e "fetch('http://127.0.0.1:' + (process.env.APP_PORT || 8787) + '/healthz').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"
CMD ["node", "server.js"]