mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
fixed host configuration
This commit is contained in:
1 parent
90c9eb8b5c
commit
de7ad2f072
2 files changed
+15
-3
No files matched your search
@@ -18,6 +18,8 @@ services:
|
||||
context: ./frontend
|
||||
ports:
|
||||
- "5173:5173"
|
||||
env_file:
|
||||
- ./.env
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules # Prevents host node_modules from overwriting container
|
||||
|
||||
+13
-3
@@ -1,7 +1,17 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), '');
|
||||
|
||||
const allowedHosts = env.VITE_ALLOWED_HOSTS?.split(',') || [];
|
||||
|
||||
return {
|
||||
plugins: [react()],
|
||||
server: {
|
||||
host: true, // Allow external access
|
||||
allowedHosts: allowedHosts,
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user