chore(dev): add frontend service to docker compose

This commit is contained in:
2026-03-01 01:07:54 +03:00
parent 48fb0c9487
commit 74348f224d
3 changed files with 26 additions and 2 deletions

View File

@@ -1,18 +1,21 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
const apiTarget = process.env.VITE_API_PROXY_TARGET || 'http://localhost:3000'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://localhost:3000',
target: apiTarget,
changeOrigin: true,
},
'/socket.io': {
target: 'http://localhost:3000',
target: apiTarget,
changeOrigin: true,
ws: true,
},