fixed host configuration

This commit is contained in:
nvrl committed 2026-02-15 21:44:39 +01:00
1 parent 90c9eb8b5c
commit de7ad2f072
2 files changed
+15 -3

No files matched your search

+2
View File
@@ -18,6 +18,8 @@ services:
context: ./frontend context: ./frontend
ports: ports:
- "5173:5173" - "5173:5173"
env_file:
- ./.env
volumes: volumes:
- ./frontend:/app - ./frontend:/app
- /app/node_modules # Prevents host node_modules from overwriting container - /app/node_modules # Prevents host node_modules from overwriting container
+13 -3
View File
@@ -1,7 +1,17 @@
import { defineConfig } from 'vite' import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react'
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig(({ mode }) => {
plugins: [react()], const env = loadEnv(mode, process.cwd(), '');
const allowedHosts = env.VITE_ALLOWED_HOSTS?.split(',') || [];
return {
plugins: [react()],
server: {
host: true, // Allow external access
allowedHosts: allowedHosts,
}
}
}) })