diff --git a/Dockerfile b/Dockerfile index 221dd1c8..4914e6fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,6 +36,6 @@ COPY --from=frontend-build /app/frontend/dist ./public COPY start.sh ./ RUN chmod +x start.sh -EXPOSE 3000 +EXPOSE 80 CMD ["./start.sh"] diff --git a/backend/src/index.ts b/backend/src/index.ts index 84202021..19002580 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -22,7 +22,7 @@ import settingsRouter from './routes/settings'; import notificationsRouter from './routes/notifications'; const app = express(); -const PORT = parseInt(process.env.PORT || '3000', 10); +const PORT = parseInt(process.env.PORT || '80', 10); // Trust Coolify/Traefik reverse proxy app.set('trust proxy', 1); diff --git a/start.sh b/start.sh index 42d33b9e..dee071b8 100644 --- a/start.sh +++ b/start.sh @@ -179,5 +179,5 @@ async function seed() { seed(); " 2>/dev/null || echo "[start] Seed warning (continuing)" -echo "[start] Starting Node.js backend on port 3000..." +echo "[start] Starting Node.js backend on port ${PORT:-80}..." exec node dist/index.js