-
Notifications
You must be signed in to change notification settings - Fork 0
Use host networking for compose OAuth callbacks #5
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -114,13 +114,13 @@ docker compose up -d --build | |
| docker compose logs hatch | ||
| ``` | ||
|
|
||
| The compose file maps host port `${HATCH_HTTPS_HOST_PORT:-8443}` to container port `${HATCH_HTTPS_PORT:-443}`. Stop it with: | ||
| The compose file uses host networking and listens on `${HATCH_HTTPS_PORT:-8443}` directly on the host. Stop it with: | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in b44b63f: .env.example now defaults HATCH_HTTPS_PORT to 8443 for Compose host networking and removes the unused HATCH_HTTPS_HOST_PORT setting. |
||
|
|
||
| ```bash | ||
| docker compose down | ||
| ``` | ||
|
|
||
| For host-network OAuth callback mode, prefer the `docker run --network host` command above because compose port mappings are not used with host networking. | ||
| The compose file uses host networking for OAuth callback mode. In this mode Chromium's `127.0.0.1` is the Linux host loopback, so dynamic callback URLs such as `http://127.0.0.1:40397/callback/...` can reach the listener started by the OAuth tool. Docker ignores compose port mappings when host networking is enabled, so Hatch listens on `${HATCH_HTTPS_PORT:-8443}` directly on the host. | ||
|
|
||
| ## E2E Guacamole Test | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,15 +5,14 @@ services: | |
| image: hatch:local | ||
| container_name: hatch | ||
| restart: unless-stopped | ||
| ports: | ||
| - "${HATCH_HTTPS_HOST_PORT:-8443}:${HATCH_HTTPS_PORT:-443}" | ||
| network_mode: host | ||
| shm_size: "1gb" | ||
| environment: | ||
| RDP_USER: ${RDP_USER:-oauth} | ||
| RDP_PASSWORD: ${RDP_PASSWORD:-} | ||
| GUAC_USER: ${GUAC_USER:-} | ||
| GUAC_PASSWORD: ${GUAC_PASSWORD:-} | ||
| HATCH_HTTPS_PORT: ${HATCH_HTTPS_PORT:-443} | ||
| HATCH_HTTPS_PORT: ${HATCH_HTTPS_PORT:-8443} | ||
|
Comment on lines
+8
to
+15
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in b44b63f: .env.example now uses HATCH_HTTPS_PORT=8443 for host networking and removes HATCH_HTTPS_HOST_PORT, which Compose no longer uses. |
||
| HATCH_START_URL: ${HATCH_START_URL:-about:blank} | ||
| HATCH_MAC_SHORTCUTS: ${HATCH_MAC_SHORTCUTS:-1} | ||
| CHROMIUM_EXTRA_FLAGS: ${CHROMIUM_EXTRA_FLAGS:-} | ||
|
|
||
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.
Fixed in b44b63f: .env.example now matches the documented Compose behavior by setting HATCH_HTTPS_PORT=8443.