Hey all
I’m trying to deploy a Slack bot that uses the Canopy RAG system. The bot connects to Canopy by Pinecone for embedding and searching a database. I’ve developed a Flask app as middleware. It works locally, but I’m running into issues when deploying to Heroku.
The main issue is integrating the Canopy container with my Flask app for Heroku deployment. I managed to extract the Canopy container into the same directory as the Flask app, but I’m not sure how to start both Canopy and Gunicorn together when the app gets pinged from Slack.
Project Repository: GitHub - isorabins/slack_bot_the_truth_latest: slack bot with canopy
App url: https://thetruth-6332296f8065.herokuapp.com
What I’ve done:
- Developed and tested the Slack bot and Flask middleware locally.
-been using “canopy start”, which I know is a dev server, but not sure how to set the start to use unicorn… - Extracted the Canopy container into the same directory as the Flask app.
- Created a
gunicorn_start.sh
script to start both Canopy and Gunicorn. - Encountered issues with the correct startup sequence and integration.
Questions
-
How should I modify my
gunicorn_start.sh
script to start both Canopy and Gunicorn together on Heroku? -
What changes do I need to make in my
app.py
to ensure that Canopy starts when the Flask app gets pinged from Slack? -
What’s the correct URL to use for Canopy when it’s live in production on Heroku?
Env info:
Development Environment: macOS
Deployment Target: Heroku
Technologies: Slack Bot, Flask, Canopy (Pinecone), Heroku
I really appreciate any help! Fairly new to all this, so excited to get this app live.
Thank you!