From 9206c21cb9beb8ff44c99b9f4ea712e0bd171a5e Mon Sep 17 00:00:00 2001 From: Huzaifa Inam Date: Fri, 7 Aug 2026 15:00:37 +0500 Subject: [PATCH] Ports fixed --- Dockerfile | 7 ++----- docker-compose.yml | 9 ++++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4b5c4a3..8e99ed9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ FROM node:20-alpine AS runner WORKDIR /app ENV NODE_ENV=production -ENV PORT=3000 +ENV PORT=7000 ENV DATA_PATH=/app/data/portal-data.json # Copy package manifests @@ -44,12 +44,9 @@ COPY --from=builder /app/dist ./dist # Create persistent data directory RUN mkdir -p /app/data -# Expose server port (default 3000) -EXPOSE 3000 - # Healthcheck to verify Express server status HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ - CMD wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1 + CMD wget --no-verbose --tries=1 --spider http://localhost:7000/api/health || exit 1 # Start production application server CMD ["node", "dist/server.cjs"] diff --git a/docker-compose.yml b/docker-compose.yml index 06d4d8b..d6b17de 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,18 +32,17 @@ services: depends_on: postgres: condition: service_healthy - ports: - # Use HOST_PORT (default 8080) to prevent conflicts if host port 3000 is already occupied by another app - - "${HOST_PORT:-8080}:3000" + port: + - "7000" environment: - NODE_ENV=production - - PORT=3000 + - PORT=7000 - DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD:-postgres_secure_pass_2026}@postgres:5432/balance_sheet_db - DATA_PATH=/app/data/portal-data.json volumes: - portal_data:/app/data healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:7000/api/health"] interval: 30s timeout: 5s retries: 3