From d036fbf568d7d7ae99b13cdec1575f3240c60929 Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Mon, 8 Jun 2026 17:51:29 +0700 Subject: [PATCH] =?UTF-8?q?opt(deploy):=20multi-stage=20frontend=20(node?= =?UTF-8?q?=E2=86=92nginx),=20non-root=20user,=20healthchecks,=20resource?= =?UTF-8?q?=20limits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Frontend: - Multi-stage build: builder (node:22-alpine) → runner (nginx:alpine) replaces vite preview (400MB RAM) with nginx static serving (<20MB RAM) - New nginx-frontend.conf with gzip + long-term asset cache + SPA fallback Backend & Discord Gateway: - Add non-root user (USER app) for container security - chown app files to avoid permission issues - Add HEALTHCHECK: backend via /api/health, gateway via kill -0 1 Docker Compose: - Remove unnecessary backend→gateway depends_on - Add deploy.resources.limits.memory for all services - Add healthchecks for all services Co-Authored-By: Claude Opus 4.8