Open hosts to 'all'

This commit is contained in:
Ahmed DCHAR 2025-11-03 00:42:11 +01:00
parent 99b918a13d
commit 7fb3319277
2 changed files with 5 additions and 3 deletions

View File

@ -27,5 +27,5 @@ ENV NODE_ENV=production
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ 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))" 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 # Serve the production build with Vite preview server (--open false disables browser launch)
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "8081"] CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "8081", "--open", "false"]

View File

@ -14,7 +14,9 @@ export default defineConfig({
// Preview server configuration // Preview server configuration
preview: { preview: {
port: 5174, 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 // Build configuration