chore: fix ngrok setup to run locally
Frontend CD / build (push) Failing after 2m31s

This commit is contained in:
2026-08-07 15:55:04 +02:00
parent 923617bdff
commit a96a113f49
3 changed files with 15 additions and 3 deletions
+1
View File
@@ -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
View File
@@ -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
+2 -2
View File
@@ -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