feat: add DEV_PORT env var for running dev alongside production

This commit is contained in:
2026-01-02 21:17:32 +01:00
parent 7ef29aba37
commit 14b566ce2a
2 changed files with 7 additions and 1 deletions

5
.gitignore vendored
View File

@@ -36,3 +36,8 @@ docker-compose.override.yml
# Claude Code project instructions (local only)
CLAUDE.md
# Dev artifacts
dev.env
backend/vessel-backend
data/

View File

@@ -4,11 +4,12 @@ import { defineConfig } from 'vite';
// Use environment variable or default to localhost (works with host network mode)
const ollamaUrl = process.env.OLLAMA_API_URL || 'http://localhost:11434';
const backendUrl = process.env.BACKEND_URL || 'http://localhost:9090';
const devPort = parseInt(process.env.DEV_PORT || '7842', 10);
export default defineConfig({
plugins: [sveltekit()],
server: {
port: 7842,
port: devPort,
proxy: {
// Backend health check
'/health': {