From 7fb3319277a7f05216a145f28f3a8c27cf80c7a7 Mon Sep 17 00:00:00 2001 From: Ahmed DCHAR Date: Mon, 3 Nov 2025 00:42:11 +0100 Subject: [PATCH] Open hosts to 'all' --- Dockerfile | 4 ++-- vite.config.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e3471b..6e810c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,5 +27,5 @@ ENV NODE_ENV=production HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD node -e "require('http').get('http://localhost:8081', (r) => process.exit(r.statusCode === 200 ? 0 : 1))" -# Serve the production build with Vite preview server -CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "8081"] +# Serve the production build with Vite preview server (--open false disables browser launch) +CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "8081", "--open", "false"] diff --git a/vite.config.js b/vite.config.js index e1ab045..6028668 100644 --- a/vite.config.js +++ b/vite.config.js @@ -14,7 +14,9 @@ export default defineConfig({ // Preview server configuration preview: { port: 5174, - open: true, + open: false, // Don't auto-open in Docker + host: true, // Listen on all addresses + allowedHosts: ['all'], // Allow proxy domains }, // Build configuration