fix(deploy): backend'i sabit PORT=3001'e zorla (Coolify PORT=80 nginx ile çakışıyordu)

This commit is contained in:
2026-08-27 10:46:59 +03:00
parent cc0b6b6017
commit 1b28ebb603
+4 -2
View File
@@ -18,8 +18,10 @@ COPY --from=build /app/nginx.conf /etc/nginx/http.d/default.conf
WORKDIR /app
COPY --from=build /app/server ./server
# Başlangıç: Node backend'i (3001) arka planda + nginx ön planda
RUN printf '#!/bin/sh\nset -e\nnode /app/server/index.js &\nexec nginx -g "daemon off;"\n' > /start.sh \
# Başlangıç: Node backend'i (sabit 3001) arka planda + nginx (80) ön planda.
# Coolify container'a PORT=80 verir; backend'i 3001'e sabitleyip nginx ile
# çakışmasını önlüyoruz (nginx /api → 127.0.0.1:3001 proxy'ler).
RUN printf '#!/bin/sh\nset -e\nPORT=3001 node /app/server/index.js &\nexec nginx -g "daemon off;"\n' > /start.sh \
&& chmod +x /start.sh
EXPOSE 80