🐳 Fix: Use env vars for serve binding
This commit is contained in:
@@ -22,10 +22,11 @@ RUN npm install -g serve
|
|||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Environment
|
# Environment - serve will bind to 0.0.0.0 automatically with these
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV PORT=3000
|
ENV PORT=3000
|
||||||
ENV HOST=0.0.0.0
|
ENV HOST=0.0.0.0
|
||||||
|
ENV SERVE_LISTEN=0.0.0.0:3000
|
||||||
|
|
||||||
# Start server - MUST bind to 0.0.0.0 for Docker
|
# Start server - simple command, env vars handle binding
|
||||||
CMD ["serve", "dist", "-l", "3000", "--config", "{\"public\":\"dist\",\"directoryListing\":false}"]
|
CMD ["serve", "dist"]
|
||||||
|
|||||||
Reference in New Issue
Block a user