fix(deploy): backend'i sabit PORT=3001'e zorla (Coolify PORT=80 nginx ile çakışıyordu)
This commit is contained in:
+4
-2
@@ -18,8 +18,10 @@ COPY --from=build /app/nginx.conf /etc/nginx/http.d/default.conf
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app/server ./server
|
COPY --from=build /app/server ./server
|
||||||
|
|
||||||
# Başlangıç: Node backend'i (3001) arka planda + nginx ön planda
|
# Başlangıç: Node backend'i (sabit 3001) arka planda + nginx (80) ön planda.
|
||||||
RUN printf '#!/bin/sh\nset -e\nnode /app/server/index.js &\nexec nginx -g "daemon off;"\n' > /start.sh \
|
# 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
|
&& chmod +x /start.sh
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
Reference in New Issue
Block a user