improve and simplify setup

This commit is contained in:
Ruben Fiszel
2023-09-21 11:00:42 +02:00
parent 2f0e43bfdb
commit ef98d71031
9 changed files with 26 additions and 34 deletions
-7
View File
@@ -1,4 +1,3 @@
DB_PASSWORD=changeme
DATABASE_URL=postgres://postgres:changeme@db/windmill?sslmode=disable
WM_IMAGE=ghcr.io/windmill-labs/windmill:main
@@ -9,11 +8,5 @@ WM_LICENSE_KEY=""
# WM_LICENSE_KEY="<id>.<expiry>.<signature>"
# this is the url that your instance is publicly exposed to
WM_BASE_URL=http://localhost
# To use another port than :80, setup the Caddyfile and the caddy section of the docker-compose to your needs: https://caddyserver.com/docs/getting-started
# To have caddy take care of automatic TLS
WM_REQUEST_SIZE_LIMIT=50097152 # 50MB (The size limit for any requests, including script/flow args inputs)
+1 -2
View File
@@ -211,7 +211,6 @@ compiling from source or using without a postgres super user, see
curl https://raw.githubusercontent.com/windmill-labs/windmill/main/docker-compose.yml -o docker-compose.yml
curl https://raw.githubusercontent.com/windmill-labs/windmill/main/Caddyfile -o Caddyfile
curl https://raw.githubusercontent.com/windmill-labs/windmill/main/.env -o .env
curl https://raw.githubusercontent.com/windmill-labs/windmill/main/oauth.json -o oauth.json
docker compose up -d
```
@@ -377,7 +376,7 @@ it being synced automatically everyday.
| INSTANCE_EVENTS_WEBHOOK | None | Webhook to notify of events such as new user added, signup/invite. Can hook back to windmill to send emails |
| GLOBAL_CACHE_INTERVAL | 10\*60 | (Enterprise Edition only) Interval in seconds in between bucket sync of the cache. This interval \* 2 is the time at which you're guaranteed all the worker's caches are synced together. | Worker |
| WORKER_TAGS | 'deno,go,python3,bash,flow,hub,dependency' | The worker groups assigned to that workers | Worker |
| DEDICATED_WORKER | None | Unique script to run on that worker. Has to be in the form of <workspace>:<script_path> | Worker |
| DEDICATED_WORKER | None | Unique script to run on that worker. Has to be in the form of <workspace>:<script_path> | Worker |
| CUSTOM_TAGS | None | The custom tags assignable to scripts. | Server |
| JOB_RETENTION_SECS | 60*60*24\*60 //60 days | The time in seconds after which jobs get deleted. Set to 0 or -1 to never delete |
| WAIT_RESULT_FAST_POLL_INTERVAL_MS | 50 | The time in between polling for the run_wait_result endpoints in fast poll mode | Server |
@@ -0,0 +1 @@
-- Add down migration script here
@@ -0,0 +1,4 @@
-- Add up migration script here
INSERT INTO config (name, config) VALUES
('worker__default', '{"worker_tags": ["deno", "python3", "go", "bash", "powershell", "dependency", "flow", "hub", "other", "bun"]}'),
('worker__native', '{"worker_tags": ["nativets", "postgresql", "mysql", "graphql", "snowflake"]}') ON CONFLICT DO NOTHING;
+3 -19
View File
@@ -12,7 +12,7 @@ services:
expose:
- 5432
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_PASSWORD: changeme
POSTGRES_DB: windmill
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
@@ -30,21 +30,17 @@ services:
- 8000
environment:
- DATABASE_URL=${DATABASE_URL}
- BASE_URL=${WM_BASE_URL}
- RUST_LOG=info
## You can set the number of workers to 1 and not need any separate worker service but not recommended
- NUM_WORKERS=0
- DISABLE_SERVER=false
- METRICS_ADDR=false # (ee only, if set to true, metrics will be exposed on port 8001)
- REQUEST_SIZE_LIMIT=${WM_REQUEST_SIZE_LIMIT}
# LICENSE_KEY is only needed for the enterprise edition
- LICENSE_KEY=${WM_LICENSE_KEY}
depends_on:
db:
condition: service_healthy
volumes:
# See Oauth (https://docs.windmill.dev/docs/misc/setup_oauth)
- ./oauth.json:/usr/src/app/oauth.json
windmill_worker:
image: ${WM_IMAGE}
@@ -54,13 +50,11 @@ services:
restart: unless-stopped
environment:
- DATABASE_URL=${DATABASE_URL}
- BASE_URL=${WM_BASE_URL}
- RUST_LOG=info
- DISABLE_SERVER=true
- KEEP_JOB_DIR=false
- METRICS_ADDR=false
# To handle all tags, remove the env variable altogether. If you do so, you can remove the windmill_worker_native containers.
- WORKER_TAGS=deno,python3,go,bash,powershell,dependency,flow,hub,other,bun
- WORKER_GROUP=default
# LICENSE_KEY is only needed for the enterprise edition
- LICENSE_KEY=${WM_LICENSE_KEY}
depends_on:
@@ -70,8 +64,6 @@ services:
volumes:
# mount the docker socket to allow to run docker containers from within the workers
- /var/run/docker.sock:/var/run/docker.sock
# See Oauth (https://docs.windmill.dev/docs/misc/setup_oauth)
- ./oauth.json:/usr/src/app/oauth.json
- worker_dependency_cache:/tmp/windmill/cache
## This worker is specialized for "native" jobs. They run in-process and can thus be parallelized to more than 1 at a time on a given worker which is why NUM_WORKERS is set to 4
@@ -88,22 +80,14 @@ services:
restart: unless-stopped
environment:
- DATABASE_URL=${DATABASE_URL}
- BASE_URL=${WM_BASE_URL}
- RUST_LOG=info
- DISABLE_SERVER=true
- KEEP_JOB_DIR=false
- METRICS_ADDR=false # (ee only, if set to true, metrics will be exposed on port 8001)
- NUM_WORKERS=4
- WORKER_TAGS=nativets,postgresql,mysql,graphql,snowflake
- WORKER_GROUP=native
# LICENSE_KEY is only needed for the enterprise edition
# - LICENSE_KEY=${WM_LICENSE_KEY}
depends_on:
db:
condition: service_healthy
volumes:
# See Oauth (https://docs.windmill.dev/docs/misc/setup_oauth)
- ./oauth.json:/usr/src/app/oauth.json
lsp:
@@ -42,12 +42,12 @@
fieldType: 'seconds',
placeholder: '60',
storage: 'setting',
cloudonly: true
cloudonly: false
},
{
label: 'Max Timeout for sync endpoints',
key: 'timeout_wait_result',
cloudonly: false,
cloudonly: true,
fieldType: 'seconds',
placeholder: '60',
storage: 'config'
@@ -133,6 +133,9 @@
if (values['retention_period_secs'] == undefined) {
values['retention_period_secs'] = 60 * 60 * 24 * 60
}
if (values['base_url'] == undefined) {
values['base_url'] = 'http://localhost'
}
}
async function saveSettings() {
@@ -366,7 +369,6 @@
on:click={async () => {
await saveSettings()
sendUserToast('Settings updated')
dispatch('save')
}}>Save</Button
>
<div class="pb-8" />
@@ -175,7 +175,7 @@
size="xs"
on:click={() => {
if (nconfig != undefined) {
nconfig.worker_tags = nativeTags
nconfig.worker_tags = defaultTags
dirty = true
}
}}
@@ -2,8 +2,18 @@
import { goto } from '$app/navigation'
import CenteredModal from '$lib/components/CenteredModal.svelte'
import InstanceSettings from '$lib/components/InstanceSettings.svelte'
import { Button } from '$lib/components/common'
</script>
<CenteredModal title="Instance Settings">
<InstanceSettings on:save={() => goto('/apps/get/g/all/setup_app')} />
<InstanceSettings />
<p class="text-secondary text-sm px-2 py-4">
You can change these settings later in the superadmins settings but finishing setup will leave
this page.
</p>
<Button
on:click={() => {
goto('/apps/get/g/all/setup_app')
}}>Finish Setup</Button
>
</CenteredModal>
-1
View File
@@ -1 +0,0 @@
{}