Closed yingzit123 closed 4 months ago
Hi @yingzit123, thanks for asking the question. For bolt-python apps, you can pass your custom port to the start method: https://slack.dev/bolt-python/api-docs/slack_bolt/app/index.html#slack_bolt.app.App.start
Hope this helps.
Thank you so much! That works!
(Describe your issue and goal here)
Reproducible in:
The
slack_bolt
versionslack-bolt==1.18.1 slack_sdk==3.27.2
Python runtime version
Python 3.12.3
OS info
macOS
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., setup.py))
I am trying to have my slack app running on docker. It run successfully locally and function well. However, when I containerize it to image and have it run in container and opened port for the container, it is not functioning. Knowing that the default port for slack bolt is 3000, I originally tried to customize the port because I have a next.js app listen to port 3000 by adding port parameter when creating the App following this link https://github.com/slackapi/bolt-js/issues/1200.
app = App(token=token, port=port)
However, it just showed up error saying"TypeError: App.__init__() got an unexpected keyword argument 'port'"
. I tried to search for possible arguments for App constructor but did not find it in the documentation. Then, I just changed the port of my next.js port to 8080 and have slack bolt stay unchanged (should listen to port 3000). When I made image with my Dockerfile:and run it with command
there is no error showing up but the slack bolt is still not functioning. I checked my docker and the environment var of slack tokens are in there so it should not be related to authentication problem. Does anyone know why?