From 4c21749c079250b58a74204cadb747ee23aa65ae Mon Sep 17 00:00:00 2001 From: Luke Hagar Date: Mon, 20 Oct 2025 23:02:21 -0500 Subject: [PATCH] Update docker-compose.yml and Dockerfile to simplify port configuration by removing quotes around port numbers and reintroducing the EXPOSE directive for the application service. --- Dockerfile | 2 ++ docker-compose.yml | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b9de0e..0cdc3f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,8 @@ RUN bun run build ENV NODE_ENV=production +EXPOSE 3000 + # Default command can be overridden by compose CMD ["bun", "run", "build/index.js"] diff --git a/docker-compose.yml b/docker-compose.yml index e71fc67..f05870f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: volumes: - pgdata:/var/lib/postgresql/data ports: - - "5432:5432" + - 5432 healthcheck: test: [ "CMD-SHELL", "pg_isready -U pypistats -d pypistats" ] interval: 5s @@ -21,7 +21,7 @@ services: REDIS_PASSWORD: ${REDIS_PASSWORD} command: [ "redis-server", "--requirepass", "${REDIS_PASSWORD}" ] ports: - - "6379:6379" + - 6379 healthcheck: test: [ "CMD-SHELL", "redis-cli -a $REDIS_PASSWORD ping" ] interval: 5s @@ -40,13 +40,12 @@ services: condition: service_healthy environment: NODE_ENV: production - PORT: 3000 SERVICE_PASSWORD_POSTGRES: ${POSTGRES_PASSWORD} SERVICE_PASSWORD_REDIS: ${REDIS_PASSWORD} DATABASE_URL: postgresql://pypistats:${POSTGRES_PASSWORD}@db:5432/pypistats?schema=public REDIS_URL: redis://:${REDIS_PASSWORD}@redis:6379 ports: - - "3000:3000" + - 3000 command: [ "sh", "-c", "bun run prisma migrate deploy && bun run build/index.js" ] volumes: