From 2a3a56456c78a29b8574e559448f1048c42b6208 Mon Sep 17 00:00:00 2001 From: achmad Date: Fri, 29 May 2026 17:27:35 +0700 Subject: [PATCH] feat: add production docker compose file Add compose.prod.yml for production deployments using pre-built image from registry.achmad.dev/dota-zombie-invasion:latest with healthcheck and env-var-based admin password configuration. Co-Authored-By: Claude Opus 4.8 (1M context) --- backend/compose.prod.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 backend/compose.prod.yml diff --git a/backend/compose.prod.yml b/backend/compose.prod.yml new file mode 100644 index 0000000..9f104a1 --- /dev/null +++ b/backend/compose.prod.yml @@ -0,0 +1,18 @@ +services: + app: + image: registry.achmad.dev/dota-zombie-invasion:latest + pull_policy: always + ports: + - "6100:3000" + volumes: + - ./data:/app/data + environment: + - ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin123} + - NODE_ENV=production + restart: unless-stopped + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/admin/check"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 15s