generated from boboko/starter
Fix: Mapping Vite ports based on .env value
This commit is contained in:
@@ -137,10 +137,10 @@ services:
|
||||
working_dir: /app
|
||||
command: npm run dev
|
||||
ports:
|
||||
- "${VITE_PORT:-5173}:5173"
|
||||
- "${VITE_PORT:-5174}:${VITE_PORT:-5174}"
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- VITE_PORT=${VITE_PORT:-5173}
|
||||
- VITE_PORT=${VITE_PORT:-5174}
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/node_modules
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ export default defineConfig({
|
||||
],
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
port: 5174,
|
||||
port: process.env.VITE_PORT || 5174,
|
||||
strictPort: true,
|
||||
cors: true,
|
||||
hmr: {
|
||||
|
||||
Reference in New Issue
Block a user