Files
rx.scoreodonto.com/dental-server/dental-client/vite.config.js
T
VPS 4 Deploy Agent 7ffaead255
build-and-promote / build (push) Failing after 7m7s
build-and-promote / promote (push) Has been skipped
feat(deploy): padroniza rx p/ Build Once->Promote->Deploy (CI registry, compose.prod, badge/health)
- .gitea/workflows/build.yml: push->build rx-scoreodonto:<sha> no registry; tag->promote+deploy
- docker-compose.prod.yml: image do registry, APP_VERSION/GIT_COMMIT em runtime
- deploy-prod.sh: VPS1 pull + up --no-build (antigo vira deploy-prod-legado-webhook.sh)
- /api/health usa APP_VERSION (tag) com fallback version.txt; badge no canto
- webhook 9003 aposentado (gatilho agora e CI/tag)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 02:39:30 +02:00

42 lines
1009 B
JavaScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// Em dev, o vite serve o frontend e faz proxy da API para o backend (container rx_dev_api).
server: {
host: '0.0.0.0',
port: 5173,
strictPort: true,
cors: true,
allowedHosts: ['dev.rx.scoreodonto.com'],
hmr: {
host: 'dev.rx.scoreodonto.com',
clientPort: 443,
protocol: 'wss',
overlay: false
},
proxy: {
'/api': {
target: 'http://rx_dev_api:3000',
configure: (proxy) => {
proxy.on('proxyRes', (proxyRes) => {
proxyRes.headers['access-control-allow-origin'] = '*';
});
}
},
'/socket.io': {
target: 'http://rx_dev_api:3000',
ws: true
},
'/uploads': 'http://rx_dev_api:3000',
'/updates': 'http://rx_dev_api:3000'
}
},
build: {
outDir: 'dist',
emptyOutDir: true
}
})