diff --git a/.env.example b/.env.example index 8cb427a1..b6fa8374 100644 --- a/.env.example +++ b/.env.example @@ -14,6 +14,7 @@ NX_NEXTAUTH_URL=http://localhost:4200 # We use ngrok to expose a local development environment to the internet # You can sign up for a free account and get an API key at https://ngrok.com NGROK_AUTH_TOKEN= +NGROK_DOMAIN= ######################################################################## # DATABASE diff --git a/README.md b/README.md index 260a3a6d..4ca434b4 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,27 @@ yarn prisma:seed yarn dev ``` +## Set Up Ngrok + +External data providers require HTTPS/SSL webhook URLs for sending data. + +To test this locally/during development, you will need to setup `ngrok`. + +1. Visit [ngrok.com](https://ngrok.com/) +2. Create a free account +3. Visit [this page](https://dashboard.ngrok.com/get-started/your-authtoken) to access your auth token +4. Paste it into your `.env` file: `NGROK_AUTH_TOKEN=your_auth_token` + +You should claim your free static domain to avoid needing to change the URL each time you start/stop the server. + +To do so: + +1. Visit the [domains](https://dashboard.ngrok.com/cloud-edge/domains) page +2. Click on Create Domain +3. Copy the domain and paste it into your `.env` file: `NGROK_DOMAIN=your_domain` + +That's it! As long as you run the project locally using `docker` with `yarn dev:services:all` you'll be good to go. + ## Contributing To contribute, please see our [contribution guide](https://github.com/maybe-finance/maybe/blob/main/CONTRIBUTING.md). diff --git a/docker-compose.yml b/docker-compose.yml index 8593af32..66ff2116 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,7 +31,7 @@ services: ports: - 4551:4551 environment: - - DOMAIN=host.docker.internal + - DOMAIN=${NGROK_DOMAIN:-host.docker.internal} - PORT=3333 - AUTH_TOKEN=${NGROK_AUTH_TOKEN} - DEBUG=true