Skip to content

A self-hosted UPI & COD payment gateway with zero per-transaction platform fees, universal JavaScript checkout integration, dynamic QR payments, WhatsApp OTP authentication, and automated payment verification.

JavaScript

fix(docker): harden container build, workspace manifests, and zero-CVE profile

ArunGupta1526697811e1e3e1
diff --git a/Dockerfile b/Dockerfile
index 55d2eb2..6744963 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -27,6 +27,7 @@ COPY apps/gmail-observer/package.json ./apps/gmail-observer/
COPY apps/control-center/package.json ./apps/control-center/
COPY apps/coin-wallet-store/package.json ./apps/coin-wallet-store/
COPY apps/payment-help/package.json ./apps/payment-help/
+COPY apps/android-observer-app/package.json ./apps/android-observer-app/
# Clean installation of dependencies with script safety
RUN npm ci --ignore-scripts
@@ -39,10 +40,14 @@ COPY . .
# Compile TypeScript packages
RUN npm run build
+# Prune development tooling before packaging production runner image
+RUN npm prune --omit=dev
+
# ── Stage 3: Runner ─────────────────────────────────────────────────────────
FROM base AS runner
ENV NODE_ENV=production
ENV YOUPI_MODE=production
+ENV YOUPI_BIND_HOST=0.0.0.0
WORKDIR /app
@@ -72,6 +77,6 @@ USER youpi
# Native healthcheck pinging core payment api
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
- CMD wget -qO- http://localhost:6100/health || exit 1
+ CMD wget -qO- http://127.0.0.1:6100/health || exit 1
CMD ["node", "scripts/start.js"]
diff --git a/docker-compose.yml b/docker-compose.yml
index 0227ce1..e0e424a 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -18,10 +18,12 @@ services:
container_name: youpi-pg
restart: unless-stopped
env_file:
- - .env
+ - path: .env
+ required: false
environment:
NODE_ENV: ${NODE_ENV:-production}
YOUPI_MODE: ${YOUPI_MODE:-localhost}
+ YOUPI_BIND_HOST: "0.0.0.0"
BASE_PAYMENT_API_URL: http://localhost:6100
BASE_CHECKOUT_URL: http://localhost:7000
BASE_ADMIN_URL: http://localhost:6001
@@ -45,7 +47,7 @@ services:
volumes:
- youpi-data:/app/data
healthcheck:
- test: ["CMD", "wget", "-qO-", "http://localhost:6100/health"]
+ test: ["CMD", "wget", "-qO-", "http://127.0.0.1:6100/health"]
interval: 30s
timeout: 10s
retries: 3