Skip to content

Commit fdd4371

Browse files
Slack tool documentation updates (#944)
Slack tool readme updates
1 parent aec188d commit fdd4371

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

docs/custom_tool_guides/slack.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ To enable it, go to the `OAuth & Permissions` section of your Slack app settings
3131

3232
More information about the OAuth flow can be found [here](https://api.slack.com/authentication/oauth-v2).
3333

34-
## 3. Set Up Environment Variables
34+
## 3. Set up environment variables
3535

3636
Then set the following environment variables. You can either set the below values in your `secrets.yaml` file:
3737
```bash
@@ -45,6 +45,9 @@ SLACK_CLIENT_ID=<your_client_id from step 1>
4545
SLACK_CLIENT_SECRET=<your_client_secret from step 1>
4646
```
4747

48+
If `configuration.yaml` and `secrets.yaml` files are not present in the project, take a look at the [Toolkit Setup](/docs/setup.md) guide to create them.
49+
50+
4851
## 4. Setup HTTPS for Local Development
4952

5053
To enable HTTPS for local development, the self-signed certificate needs to be generated.
@@ -63,39 +66,57 @@ and
6366
```Dockerfile
6467
CMD uvicorn backend.main:app --reload --host 0.0.0.0 --port ${PORT} --timeout-keep-alive 300 --ssl-keyfile /workspace/key.pem --ssl-certfile /workspace/cert.pem
6568
```
66-
Change NEXT_PUBLIC_API_HOSTNAME environment variable in the .env `https` protocol:
69+
Change the NEXT_PUBLIC_API_HOSTNAME environment variable in the .env file — set the protocol to https:
70+
6771
```bash
6872
NEXT_PUBLIC_API_HOSTNAME=https://localhost:8000
6973
```
7074

71-
or in the configurations.yaml file:
75+
or in the `configuration.yaml` file:
7276

7377
```yaml
7478
auth:
7579
backend_hostname: https://localhost:8000
7680
```
77-
7881
To run the Frontend with HTTPS, update the `start` script in the `package.json` file:
7982

8083
```json
8184
"scripts": {
82-
"dev": "next dev --port 4000 --experimental-https",
85+
"dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 next dev --port 4000 --experimental-https",
86+
..........
87+
}
88+
```
89+
90+
If HTTPS is not required in the frontend, you can omit the --experimental-https flag.
91+
```json
92+
"scripts": {
93+
"dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 next dev --port 4000",
8394
..........
8495
}
8596
```
8697

87-
Add the following line to the 'docker-compose.yml' file to the frontend environment variables:
98+
Add the following line to the `docker-compose.yml` file to the frontend environment variables:
8899

89100
```yaml
90-
NEXT_PUBLIC_API_HOSTNAME=https://localhost:8000
101+
...........
102+
frontend:
103+
build:
104+
target: ${BUILD_TARGET:-prod}
105+
context: ./src/interfaces/assistants_web
106+
dockerfile: Dockerfile
107+
# Set environment variables directly in the docker-compose file
108+
environment:
109+
API_HOSTNAME: https://backend:8000
110+
NEXT_PUBLIC_API_HOSTNAME: https://localhost:8000
111+
...........
91112
```
92113

93114
and change the API_HOSTNAME to
94115

95116
```yaml
96117
API_HOSTNAME: https://localhost:8000
97118
```
98-
also change the src/interfaces/assistants_web/.env.development file env variables to use https.
119+
also change the `src/interfaces/assistants_web/.env.development` file env variables to use https.
99120

100121
## 5. Run the Backend and Frontend
101122

@@ -105,6 +126,12 @@ run next command to start the backend and frontend:
105126
make dev
106127
```
107128

129+
After that, navigate to `https://localhost:8000/health`. As the self-signed certificate is used,
130+
you will see a warning about the certificate. Click on the `Advanced` button and then `Proceed to localhost (unsafe)`.
131+
If you see the `{"status":"ok"}` response, the backend is running successfully. After that navigate to `https://localhost:4000` to see the frontend.
132+
133+
134+
108135
## 6. Troubleshooting
109136

110137
If you encounter any issues with OAuth, please check the following [link](https://api.slack.com/authentication/oauth-v2#errors)

0 commit comments

Comments
 (0)