diff --git a/docs/deployment/overview.mdx b/docs/deployment/overview.mdx index 72baa9ec2a..8c15954cba 100644 --- a/docs/deployment/overview.mdx +++ b/docs/deployment/overview.mdx @@ -180,7 +180,7 @@ Now you can trigger tasks against the staging environment by setting the `TRIGGE TRIGGER_SECRET_KEY="tr_stg_abcd123" ``` -Currently, we only support two environments: `prod` and `staging`. Multiple environments are on our roadmap which you can track [here](https://feedback.trigger.dev/p/more-environments). +For additional environments beyond `prod` and `staging`, you can use [preview branches](/deployment/preview-branches), which allow you to create isolated environments for each branch of your code. ## Local builds diff --git a/docs/guides/examples/puppeteer.mdx b/docs/guides/examples/puppeteer.mdx index da1874476c..9a6f91f018 100644 --- a/docs/guides/examples/puppeteer.mdx +++ b/docs/guides/examples/puppeteer.mdx @@ -153,6 +153,7 @@ In this example we use [Puppeteer](https://pptr.dev/) with a [BrowserBase](https When web scraping, you MUST use the technique below which uses a proxy with Puppeteer. Direct scraping without using `browserWSEndpoint` is prohibited and will result in account suspension. + Screenshots are also prohibited when scraping. ### Task code diff --git a/docs/how-it-works.mdx b/docs/how-it-works.mdx index 3e2857f157..88bb4c0703 100644 --- a/docs/how-it-works.mdx +++ b/docs/how-it-works.mdx @@ -430,7 +430,9 @@ When you run `npx trigger.dev@latest dev`, we run your task code locally on your ## Staging and production environments -Trigger.dev supports deploying to multiple "deployed" environments, such as staging and production. This allows you to test your tasks in a staging environment before deploying them to production. You can deploy to a new environment by running `npx trigger.dev@latest deploy --env `, where `` is the name of the environment you want to deploy to. Each environment has its own API Key, which you can use to trigger tasks in that environment. +Trigger.dev supports deploying to `prod` and `staging` environments. This allows you to test your tasks in a staging environment before deploying them to production. You can deploy to a different environment by running `npx trigger.dev@latest deploy --env `, where `` is either `prod` or `staging`. Each environment has its own API Key, which you can use to trigger tasks in that environment. + +For additional isolated environments, you can use [preview branches](/deployment/preview-branches), which allow you to create separate environments for each branch of your code. ## OpenTelemetry diff --git a/docs/self-hosting/docker.mdx b/docs/self-hosting/docker.mdx index b0834d35ff..dbbc3578e8 100644 --- a/docs/self-hosting/docker.mdx +++ b/docs/self-hosting/docker.mdx @@ -184,6 +184,30 @@ docker compose down docker compose up -d ``` +### Creating additional worker groups + +To create additional worker groups beyond the bootstrap group, use the admin API endpoint. This requires admin privileges. + +**Making a user admin:** +- **New users**: Set `ADMIN_EMAILS` environment variable (regex pattern) before user creation. +- **Existing users**: Set `admin = true` in the `user` table in your database. + +**Creating a worker group:** + +```bash +api_url=http://localhost:8030 +wg_name=my-worker +admin_pat=tr_pat_... + +curl -X POST \ + "$api_url/admin/api/v1/workers" \ + -H "Authorization: Bearer $admin_pat" \ + -H "Content-Type: application/json" \ + -d "{\"name\": \"$wg_name\"}" +``` + +The response includes a `token` field if the worker group is newly created. + ## Registry setup The registry is used to store and pull deployment images. When testing the stack locally, the defaults should work out of the box. diff --git a/docs/self-hosting/env/webapp.mdx b/docs/self-hosting/env/webapp.mdx index eb4c1ed7f4..fb61a8ff40 100644 --- a/docs/self-hosting/env/webapp.mdx +++ b/docs/self-hosting/env/webapp.mdx @@ -142,5 +142,5 @@ mode: "wide" | `OPENAI_API_KEY` | No | — | OpenAI API key. | | `MACHINE_PRESETS_OVERRIDE_PATH` | No | — | Path to machine presets override file. See [machine overrides](/self-hosting/overview#machine-overrides). | | `APP_ENV` | No | `NODE_ENV` | App environment. Used for things like the title tag. | -| `ADMIN_EMAILS` | No | — | Regex of user emails to automatically promote to admin. | +| `ADMIN_EMAILS` | No | — | Regex of user emails to automatically promote to admin on signup. Does not apply to existing users. | | `EVENT_LOOP_MONITOR_ENABLED` | No | 1 | Node.js event loop lag monitor. | \ No newline at end of file