Major Updates to Network and Load Balancing

This commit is contained in:
2025-06-12 21:50:01 +02:00
parent f111f76a3b
commit f6508aa435
17 changed files with 2098 additions and 163 deletions

View File

@@ -16,5 +16,31 @@ RUN npm prune
FROM base as production
ENV PORT=$PORT
# Install PM2 and required tools
RUN apt-get update && apt-get install -y \
curl \
tini \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g pm2
# Copy built application
COPY --from=build /app/.output /app/.output
CMD ["node", ".output/server/index.mjs"]
# Copy PM2 config and entrypoint
COPY ecosystem.config.js /app/
COPY docker-entrypoint.sh /app/
RUN chmod +x /app/docker-entrypoint.sh
# Create logs directory
RUN mkdir -p /app/logs
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:${PORT}/api/health || exit 1
# Use tini as init process
ENTRYPOINT ["/usr/bin/tini", "--"]
# Start with our custom entrypoint
CMD ["/app/docker-entrypoint.sh"]