-
Notifications
You must be signed in to change notification settings - Fork 44.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(server): REST API and WS API now use env vars for host and port. #8057
Conversation
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍
|
✅ Deploy Preview for auto-gpt-docs canceled.
|
rnd/autogpt_server/.env.example
Outdated
AP_SERVER_HOST="0.0.0.0" | ||
AP_SERVER_PORT="8000" | ||
|
||
# WS API | ||
WS_SERVER_HOST="0.0.0.0" | ||
WS_SERVER_PORT="8001" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit for consistency
AP_SERVER_HOST="0.0.0.0" | |
AP_SERVER_PORT="8000" | |
# WS API | |
WS_SERVER_HOST="0.0.0.0" | |
WS_SERVER_PORT="8001" | |
AP_SERVER_HOST=localhost | |
AP_SERVER_PORT=8000 | |
# WS API | |
WS_SERVER_HOST=localhost | |
WS_SERVER_PORT=8001 |
edit: I realised that 0.0.0.0
is not the same as localhost
but quote marks can be removed nonetheless.
I think it would be good if @aarushik93 and @majdyz looked at this as well. |
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
Since #8008, the ports are configurable: AutoGPT/rnd/autogpt_server/autogpt_server/util/settings.py Lines 75 to 88 in f8f6bbc
These settings can be used like Do you really need the host to be separately configurable? |
Yes, on production server, we need listen to the specific internal host for security reasons, so it's better to config host as a setting. |
Waiting for a loooooong time.... |
@twinsant That config file is already env-var configurable, you can use the caps too. If you want to change the Agent API port from 8006 to 8009, you can set: |
Subsequently, you can utilize the same convention to introduce host configuration. |
User description
Background
Previous versions used hard-coded settings for the server's host and port, which was inconvenient during development
Changes 🏗️
Added host and port settings to the .env file