fix: run container on port 80 to match Dokploy domain routing (fixes 502)
Dokploy domains were configured to route to internal port 80, but the Node standalone server listened on 3000, causing Bad Gateway. Align the container's PORT/EXPOSE with Dokploy's routing instead.
This commit is contained in:
@@ -9,9 +9,9 @@ COPY build/ ./
|
|||||||
# so no `npm install` is necessary here.
|
# so no `npm install` is necessary here.
|
||||||
|
|
||||||
# Expose the port that server.js listens on
|
# Expose the port that server.js listens on
|
||||||
EXPOSE 3000
|
EXPOSE 80
|
||||||
|
|
||||||
ENV PORT=3000
|
ENV PORT=80
|
||||||
ENV HOSTNAME="0.0.0.0"
|
ENV HOSTNAME="0.0.0.0"
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
|||||||
2
build.sh
2
build.sh
@@ -88,5 +88,5 @@ fi
|
|||||||
echo
|
echo
|
||||||
echo "Done. This script did NOT commit, push, or trigger Dokploy."
|
echo "Done. This script did NOT commit, push, or trigger Dokploy."
|
||||||
echo "Review the diff above, then: git add -A && git commit && git push, and redeploy doormilesite in Dokploy."
|
echo "Review the diff above, then: git add -A && git commit && git push, and redeploy doormilesite in Dokploy."
|
||||||
echo "Dokploy must route to internal container port 3000."
|
echo "Dokploy must route to internal container port 80."
|
||||||
echo "Required SMTP environment variables in Dokploy: SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, CONTACT_RECEIVER"
|
echo "Required SMTP environment variables in Dokploy: SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, CONTACT_RECEIVER"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ http {
|
|||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
upstream nextjs {
|
upstream nextjs {
|
||||||
server 127.0.0.1:3000;
|
server 127.0.0.1:80;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
|||||||
Reference in New Issue
Block a user