feat(docker): unify dynamic PORT across Dockerfile, compose, and dev server

This commit is contained in:
venus
2026-09-13 02:04:37 -05:00
parent 78b1e0b485
commit d3aefa343e
5 changed files with 23 additions and 11 deletions
+4 -3
View File
@@ -5,9 +5,10 @@ WORKDIR /app
# Dynamic build arguments & environment variables
ARG SITE_DOMAIN
ARG SITE_URL
ARG PORT=8080
ENV SITE_DOMAIN=$SITE_DOMAIN
ENV SITE_URL=$SITE_URL
ENV PORT=8080
ENV PORT=$PORT
ENV NODE_ENV=production
# Install dependencies
@@ -20,8 +21,8 @@ COPY . .
# Build static production assets
RUN npm run build
# Expose web server port
EXPOSE 8080
# Expose web server port dynamically
EXPOSE ${PORT}
# Serve site with npm
CMD ["npm", "start"]