diff --git a/src/docs/backend/development-server.mdx b/src/docs/backend/development-server.mdx index a2e22790b4..2417024a95 100644 --- a/src/docs/backend/development-server.mdx +++ b/src/docs/backend/development-server.mdx @@ -27,3 +27,31 @@ This will do literally nothing except bring up the web workers. You are now resp * Starting Celery workers using `sentry run worker` to run most kinds of background jobs. Use `sentry run --help` to see what you might be missing by not running devserver. + + +## Using ngrok + +The development server can be operated behind ngrok for when you need to receive traffic from the outside world. This comes up frequently when working with integrations. Start off by defining a configuration file for `ngrok`: + +```yaml +version: '2' +authtoken: +tunnels: + acme-org + proto: http + hostname: $yourname.ngrok.dev + addr: 8010 + host_header: 'rewrite' +``` + +Next start up ngrok with your configuration file: + +```shell +ngrok start --all --config ngrok.yml` +``` + +When starting devserver provide your ngrok domain + +```shell +sentry devserver --ngrok=$yourname.ngrok.dev +``` diff --git a/src/docs/environment/index.mdx b/src/docs/environment/index.mdx index d3fdb6ef3f..f9e5ce4e06 100644 --- a/src/docs/environment/index.mdx +++ b/src/docs/environment/index.mdx @@ -72,12 +72,16 @@ In the above setup your local environment will use org slug domains, and send re ### Ngrok and siloed servers -To combine ngrok and local development servers you’ll need to reserve two domains in ngrok, and create a configuration file for ngrok: +To combine ngrok and local development servers you’ll need to reserve multipe domains in ngrok, and create a configuration file for ngrok: ```yaml version: '2' authtoken: tunnels: + acme-org: + proto: http + hostname: acme.$yourname.ngrok.dev + addr: 8000 control-silo: proto: http hostname: $yourname.ngrok.dev @@ -103,7 +107,7 @@ sentry devserver --silo=region --ngrok $yourname.ngrok.dev ngrok start --all --config regions.yml ``` -This setup will result in both the region and control servers responding to different domains, and CORS will work similar to production. +This setup will result in both the region and control servers responding to different domains. The multi-region setup with ngrok also enables customer-domains and you'll need ngrok domains for each organization you plan on using. In this configuration, CORS will work similar to production. For ngrok setup with non-siloed development server see developement server. ### Siloed Django Shell