mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
add env build configuration
This commit is contained in:
@@ -0,0 +1 @@
|
||||
VITE_DEFAULT_WEBHOOK_TYPE=async
|
||||
+20
-1
@@ -17,7 +17,7 @@ In the root folder:
|
||||
|
||||
```bash
|
||||
docker build . -t windmill
|
||||
docker-compose up db windmill_server windmill_worker
|
||||
docker compose up db windmill_server windmill_worker
|
||||
```
|
||||
|
||||
### 2. Backend is run by cargo
|
||||
@@ -145,3 +145,22 @@ Recommended config for VS Code:
|
||||
```
|
||||
|
||||
- turn _format on save_ on
|
||||
|
||||
|
||||
## Building
|
||||
|
||||
The project is built with [SvelteKit](https://kit.svelte.dev/) and uses as output static files.
|
||||
There are others adapters for sveltekit, but we use the static adapter.
|
||||
|
||||
To build the frontend as static assets, use:
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
The default build assume you serve every non static files as the 200.html file which is catchall. If you prefer a normal layout, you can use the :
|
||||
```
|
||||
NOTCATCHALL=true npm run build
|
||||
```
|
||||
|
||||
Env variables used for build are set in .env file. See [https://vitejs.dev/guide/env-and-mode.html#env-files](https://vitejs.dev/guide/env-and-mode.html#env-files) for more details.
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export const DEFAULT_WEBHOOK_TYPE: 'async' | 'sync' = 'async'
|
||||
export const DEFAULT_WEBHOOK_TYPE: 'async' | 'sync' =
|
||||
import.meta.env.VITE_DEFAULT_WEBHOOK_TYPE || 'async'
|
||||
|
||||
@@ -12,14 +12,15 @@ const config = {
|
||||
],
|
||||
|
||||
kit: {
|
||||
adapter: process.env.CLOUDFLARE
|
||||
? adapter({ pages: 'build', assets: 'build', fallback: 'index.html', precompress: false })
|
||||
: adapter({
|
||||
// default options are shown
|
||||
pages: 'build',
|
||||
assets: 'build',
|
||||
fallback: '200.html'
|
||||
}),
|
||||
adapter:
|
||||
process.env.CLOUDFLARE || process.env.NOCATCHALL
|
||||
? adapter({ pages: 'build', assets: 'build', fallback: 'index.html', precompress: false })
|
||||
: adapter({
|
||||
// default options are shown
|
||||
pages: 'build',
|
||||
assets: 'build',
|
||||
fallback: '200.html'
|
||||
}),
|
||||
prerender: { entries: [] }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user