forked from windmill-labs/windmill
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add npm_config_registry support for bun, deno and being settabl…
…e from UI (windmill-labs#2373) * foo * foo * npm config
- Loading branch information
1 parent
fc9adbe
commit c42b875
Showing
15 changed files
with
228 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,11 +226,9 @@ From there, you can follow the setup app and create other users. | |
We publish helm charts at: | ||
<https://github.com/windmill-labs/windmill-helm-charts>. | ||
|
||
### Postgres without superuser | ||
### OAuth, SSO & SMTP | ||
|
||
If you do not want, or cannot (for instance, in AWS Aurora or Cloud sql) use a | ||
postgres superuser, you can run `./init-db-as-superuser.sql` to init the | ||
required users for Windmill. | ||
Windmill Community Edition allows to configure the OAuth, SSO (including Google Workspace SSO, Microsoft/Azure and Okta) directly from the UI in the superadmin settings. Do note that there is a limit of 50 SSO users on the community edition. | ||
|
||
### Commercial license | ||
|
||
|
@@ -249,76 +247,6 @@ your current infrastructure to Windmill, support with tight SLA, and our global | |
cache sync for high-performance/no dependency cache miss of cluster from 10+ | ||
nodes to 200+ nodes. | ||
|
||
### OAuth for self-hosting | ||
|
||
To get the same oauth integrations as Windmill Cloud, mount `oauth.json` with | ||
the following format: | ||
|
||
```json | ||
{ | ||
"<client>": { | ||
"id": "<CLIENT_ID>", | ||
"secret": "<CLIENT_SECRET>", | ||
"allowed_domains": ["windmill.dev"] //restrict a client OAuth login to some domains | ||
} | ||
} | ||
``` | ||
|
||
and mount it at `/usr/src/app/oauth.json`. | ||
|
||
The redirect url for the oauth clients is: | ||
`<instance_url>/user/login_callback/<client>` | ||
|
||
Even if you setup oauth, you will still want to **login as [email protected] / | ||
changeme** to setup your instance as a super-admin and give yourself admin | ||
rights. | ||
|
||
[The list of all possible "connect an app" oauth clients](https://github.com/windmill-labs/windmill/blob/main/backend/oauth_connect.json) | ||
|
||
To add more "connect an app" OAuth clients to the Windmill project, read the | ||
[Contributor's guide](https://www.windmill.dev/docs/misc/contributing). We | ||
welcome contributions! | ||
|
||
You may also add your own custom OAuth2 IdP and OAuth2 Resource provider: | ||
|
||
```json | ||
{ | ||
"<client>": { | ||
"id": "<CLIENT_ID>", | ||
"secret": "<CLIENT_SECRET>", | ||
// To add a new OAuth2 IdP | ||
"login_config": { | ||
"auth_url": "<auth_endpoint>", | ||
"token_url": "<token_endpoint>", | ||
"userinfo_url": "<userinfo endpoint>", | ||
"scopes": ["scope1", "scope2"], | ||
"extra_params": "<if_needed>" | ||
}, | ||
// To add a new OAuth2 Resource | ||
"connect_config": { | ||
"auth_url": "<auth_endpoint>", | ||
"token_url": "<token_endpoint>", | ||
"scopes": ["scope1", "scope2"], | ||
"extra_params": "<if_needed>" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### smtp for self-hosting | ||
|
||
For users to receive emails when you invite them to workspaces or add them to | ||
the instances using their emails, configure the SMTP env variables in the | ||
servers: | ||
|
||
``` | ||
[email protected] | ||
SMTP_HOST=smtp.gmail.com | ||
SMTP_PORT=587 | ||
[email protected] | ||
SMTP_PASSWORD=yourpasswordapp | ||
``` | ||
|
||
### Resource types | ||
|
||
You will also want to import all the approved resource types from | ||
|
@@ -330,7 +258,7 @@ it being synced automatically everyday. | |
| Environment Variable name | Default | Description | Api Server/Worker/All | | ||
| --------------------------------------------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | | ||
| DATABASE_URL | | The Postgres database url. | All | | ||
| DISABLE_NSJAIL | true | Disable Nsjail Sandboxing | Worker | | ||
| WORKER_GROUP | default | The worker group the worker belongs to and get its configuration pulled from | Worker | | ||
| SERVER_BIND_ADDR | 0.0.0.0 | IP Address on which to bind listening socket | Server | | ||
| PORT | 8000 | Exposed port | Server | | ||
| NUM_WORKERS | 1 | The number of worker per Worker instance (Set to 0 for API/Server instances, Set to 1 for normal workers, and > 1 for workers dedicated to native jobs) | Worker | | ||
|
@@ -395,12 +323,13 @@ it being synced automatically everyday. | |
| SMTP_USERNAME | None | username for the smtp server to send invite emails | Server | | ||
| SMTP_PASSWORD | None | password for the smtp server to send invite emails | Server | | ||
| SMTP_TLS_IMPLICIT | false | https://docs.rs/mail-send/latest/mail_send/struct.SmtpClientBuilder.html#method.implicit_tlsemails | Server | | ||
| CREATE_WORKSPACE_REQUIRE_SUPERADMIN | true | If true, only superadmin can create workspaces | Server | | ||
| CREATE_WORKSPACE_REQUIRE_SUPERADMIN | true | If true, only superadmin can create workspaces | Server | | ||
| GLOBAL_ERROR_HANDLER_PATH_IN_ADMINS_WORKSPACE | None | Path to a script to run when a root job fails. The script will be run in and from the admins workspace | Server | | ||
| WHITELIST_ENVS | None | List of envs variables, separated by a ',' that are whitelisted as being safe to passthrough the workers | Worker | | ||
| SAML_METADATA | None | SAML Metadata URL to enable SAML SSO (EE only) | Server | | ||
| SECRET_SALT | None | Secret Salt used for encryption and decryption of secrets. If defined, the secrets will not be decryptable unless the right salt is passed in, which is the case for the workers and the server | Server + Worker | | ||
| OPENAI_AZURE_BASE_PATH | None | Azure OpenAI API base path (no trailing slash) | Server | | ||
| DISABLE_NSJAIL | true | Disable Nsjail Sandboxing | Worker | | ||
|
||
## Run a local dev setup | ||
|
||
|
14 changes: 14 additions & 0 deletions
14
backend/.sqlx/query-025e5bf6aef56e9832239489daf21b4970d84529cf7ed7928ce2dcfec8b007f0.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
backend/migrations/20231002123723_notify_delete_config.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-- Add down migration script here |
15 changes: 15 additions & 0 deletions
15
backend/migrations/20231002123723_notify_delete_config.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- Add up migration script here | ||
|
||
CREATE FUNCTION "notify_global_setting_delete" () | ||
RETURNS TRIGGER AS $$ | ||
BEGIN | ||
PERFORM pg_notify('notify_global_setting_change', OLD.name::text); | ||
RETURN OLD; | ||
END; | ||
$$ LANGUAGE PLPGSQL; | ||
|
||
CREATE OR REPLACE TRIGGER "notify_global_setting_delete" | ||
AFTER DELETE ON "global_settings" | ||
FOR EACH ROW | ||
EXECUTE FUNCTION "notify_global_setting_delete" (); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.