This commit is contained in:
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Changed
|
||||
- All deps to latest version in client for patch target.
|
||||
- All deps to latest version in client for minor target.
|
||||
- Development files for ngrok locally.
|
||||
|
||||
---
|
||||
|
||||
|
||||
+12
-1
@@ -3,6 +3,16 @@ import react from '@vitejs/plugin-react';
|
||||
import { fileURLToPath } from 'url';
|
||||
import path from 'path';
|
||||
|
||||
const proxyConfig = process.env.NGROK
|
||||
? {
|
||||
'/api': {
|
||||
target: `http://${process.env.BACKEND_HOST || 'localhost'}:8585`,
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
}
|
||||
: undefined;
|
||||
|
||||
export default defineConfig(({ mode }: ConfigEnv) => {
|
||||
const config: UserConfig = {
|
||||
define: {},
|
||||
@@ -33,7 +43,8 @@ export default defineConfig(({ mode }: ConfigEnv) => {
|
||||
},
|
||||
server: {
|
||||
port: 5000,
|
||||
...(process.env.NGROK ? { allowedHosts: ['.ngrok-free.dev'] } : {})
|
||||
...(process.env.NGROK ? { allowedHosts: ['.ngrok-free.dev'] } : {}),
|
||||
proxy: proxyConfig,
|
||||
},
|
||||
preview: {
|
||||
port: 5000
|
||||
|
||||
@@ -7,11 +7,12 @@ services:
|
||||
user: ${UID:-1000}:${GID:-1000}
|
||||
ports:
|
||||
- "5000:5000"
|
||||
entrypoint: sh -c "npm i --no-update-notifier && npm start"
|
||||
entrypoint: sh -c "npm i --no-update-notifier && export NGROK=1 && npm start"
|
||||
environment:
|
||||
VITE_BACKEND_SERVER: "/api"
|
||||
VITE_BUILD: nightly
|
||||
NGROK: 1
|
||||
BACKEND_HOST: tasknote-api
|
||||
volumes:
|
||||
- "./client:/app"
|
||||
working_dir: /app
|
||||
@@ -92,4 +93,3 @@ services:
|
||||
|
||||
networks:
|
||||
tasknote:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user