-
Notifications
You must be signed in to change notification settings - Fork 9
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
Dynamic localhost ports #124
Conversation
defining just the internal container ports allows Docker to dynamically assign the corresponding localhost ports when a container is run
docs/getting-started/README.md
Outdated
|
||
If `DJANGO_ADMIN=true`, the backend administrative interface can be accessed with the superuser you setup at | ||
<http://localhost:8000/admin>. | ||
After initialization, the client is running running on `http://localhost` at a port dynamically assigned by Docker. To find the |
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.
From within another Compose service container, the API is at `http://server:5000` using the service-forwarding features of | ||
Compose. | ||
|
||
In either case, the endpoint `/verify` serves as the Eligibility Verification API endpoint. |
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.
-
I am able to successfully build and run
docker compose build server
,docker compose up server
-
Note: This log might be confusing to users because the
* Running on http://172.26.0.3:5000/
is now incorrect
-
When I run the Docker app and the
docker ps
command, I see that the port is assigned to57463
:
-
When I have both the server and client running via docker-compose, I am able to go through a successful verification flow:
fixes an issue with docs being unable to start locally with e.g. $ docker compose up docs use the same formatting on dev for consistency
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.
💯💯💯
After Rebuild and Reopen
ing the Dev Container, restarting VSCode (for the Python extension), running the Django: Benefits Client
debugger and checking the ports with docker ps
, I was able to open:
- the Docs
- the Client
- the Server
add some screenshots for clarity normalize Dev Containter -> Devcontainer
b160ef1
to
8c32e14
Compare
Closes #123 by removing all hardcoded localhost ports and allowing Docker to assign dynamically.
Relevant docs updated to describe how to find the dynamic port for various situations.