-
-
Notifications
You must be signed in to change notification settings - Fork 629
Base context path can be changed (#88) #1424
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
Open
s4s0l
wants to merge
9
commits into
TwiN:master
Choose a base branch
from
s4s0l:88-dynamic-base-followup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d33479d
feat(ui): Base context path can be changed (#88)
simonhammes 10d5114
chore: review fixes - reverse proxy example moved to examples.
s4s0l ab21f58
chore: revert empty lines
s4s0l df91cb2
fix: web.base-path instead of ui.base, oidc aware of context patch ch…
s4s0l fc76566
refactor: Update how base-path cross config is handled
PythonGermany 4869fea
Merge pull request #1 from PythonGermany/add-base-path-support
s4s0l 0572514
test: Tests for custom base-path
s4s0l 6345796
docs: base path documentation update, oicd example mentioned
s4s0l 862613e
docs: bad dir name in example
s4s0l File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # Note that this example is using network_mode: host, which may have security implications. | ||
| # It is done this way for simplicity, to avoid complications that come from the fact that | ||
| # Gatus NEEDS to see authentication provider under same address as the one used by the end-user. | ||
| # This way both Gatus and the end-user see the authentication provider under "localhost", what | ||
| # is convenient for local testing. | ||
| services: | ||
| dex: | ||
| network_mode: host | ||
| image: ghcr.io/dexidp/dex:latest | ||
| command: ["dex", "serve", "/etc/dex/config.yaml"] | ||
| configs: | ||
| - source: dex_config_yaml | ||
| target: /etc/dex/config.yaml | ||
| healthcheck: | ||
| test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5556/healthz"] | ||
| interval: 1s | ||
| timeout: 1s | ||
| retries: 5 | ||
| start_period: 1s | ||
|
|
||
| gatus: | ||
| network_mode: host | ||
| image: twinproduction/gatus:latest | ||
| volumes: | ||
| - ../../config.yml:/config/02_config.yaml | ||
| environment: | ||
| - GATUS_CONFIG_PATH=/config | ||
| configs: | ||
| - source: gatus_config_ext | ||
| target: /config/01_config.yaml | ||
| depends_on: | ||
| dex: | ||
| condition: service_healthy | ||
|
|
||
| configs: | ||
| dex_config_yaml: | ||
| content: | | ||
| issuer: http://localhost:5556/ | ||
| storage: | ||
| type: sqlite3 | ||
| config: | ||
| file: /var/dex/dex.db | ||
| web: | ||
| http: 0.0.0.0:5556 | ||
| enablePasswordDB: true | ||
| staticClients: | ||
| - id: gatus | ||
| name: 'Gatus' | ||
| secret: gatus-client-secret | ||
| redirectURIs: | ||
| - 'http://localhost:8080/authorization-code/callback' | ||
| staticPasswords: | ||
| - email: "[email protected]" | ||
| # bcrypt hash of the string "password": $(echo password | htpasswd -BinC 10 admin | cut -d: -f2) | ||
| hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W" | ||
| username: "admin" | ||
| userID: "08a8684b-db88-4b73-90a9-3cd1661f5466" | ||
|
|
||
| gatus_config_ext: | ||
| content: | | ||
| security: | ||
| oidc: | ||
| issuer-url: "http://localhost:5556/" | ||
| redirect-url: "http://localhost:8080/authorization-code/callback" | ||
| client-id: "gatus" | ||
| client-secret: "gatus-client-secret" | ||
| scopes: | ||
| - openid | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # Note that this example is using network_mode: host, which may have security implications. | ||
| # It is done this way for simplicity, to avoid complications that come from the fact that | ||
| # Gatus NEEDS to see authentication provider under same address as the one used by the end-user. | ||
| # This way both Gatus and the end-user see the authentication provider under "localhost", what | ||
| # is convenient for local testing. | ||
| services: | ||
| dex: | ||
| network_mode: host | ||
| image: ghcr.io/dexidp/dex:latest | ||
| command: ["dex", "serve", "/etc/dex/config.yaml"] | ||
| configs: | ||
| - source: dex_config_yaml | ||
| target: /etc/dex/config.yaml | ||
| healthcheck: | ||
| test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5556/healthz"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 1s | ||
|
|
||
| caddy: | ||
| network_mode: host | ||
| image: caddy:latest | ||
| container_name: gatus_proxy | ||
| configs: | ||
| - source: caddyfile | ||
| target: /etc/caddy/Caddyfile | ||
|
|
||
| gatus: | ||
| network_mode: host | ||
| image: twinproduction/gatus:latest | ||
| container_name: gatus_behind_proxy | ||
| volumes: | ||
| - ../../config.yml:/config/02_config.yaml | ||
| environment: | ||
| - GATUS_CONFIG_PATH=/config | ||
| configs: | ||
| - source: gatus_config_ext | ||
| target: /config/01_config.yaml | ||
| depends_on: | ||
| dex: | ||
| condition: service_healthy | ||
|
|
||
|
|
||
| configs: | ||
| dex_config_yaml: | ||
| content: | | ||
| issuer: http://localhost:5556/ | ||
| storage: | ||
| type: sqlite3 | ||
| config: | ||
| file: /var/dex/dex.db | ||
| web: | ||
| http: 0.0.0.0:5556 | ||
| enablePasswordDB: true | ||
| staticClients: | ||
| - id: gatus | ||
| name: 'Gatus' | ||
| secret: gatus-client-secret | ||
| redirectURIs: | ||
| - 'http://localhost:8080/gatus/authorization-code/callback' | ||
| staticPasswords: | ||
| - email: "[email protected]" | ||
| # bcrypt hash of the string "password": $(echo password | htpasswd -BinC 10 admin | cut -d: -f2) | ||
| hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W" | ||
| username: "admin" | ||
| userID: "08a8684b-db88-4b73-90a9-3cd1661f5466" | ||
|
|
||
| gatus_config_ext: | ||
| content: | | ||
| web: | ||
| base-path: /gatus/ | ||
| port: 8081 | ||
| security: | ||
| oidc: | ||
| issuer-url: "http://localhost:5556/" | ||
| redirect-url: "http://localhost:8080/gatus/authorization-code/callback" | ||
| client-id: "gatus" | ||
| client-secret: "gatus-client-secret" | ||
| scopes: | ||
| - openid | ||
| caddyfile: | ||
| content: | | ||
| { | ||
| auto_https off | ||
| http_port 8080 | ||
| } | ||
|
|
||
| http://localhost:8080 { | ||
| handle_path /gatus/* { | ||
| reverse_proxy http://localhost:8081 | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| networks: | ||
| caddy_network: | ||
| name: gatus_proxy_network | ||
|
|
||
| services: | ||
| caddy: | ||
| networks: | ||
| - caddy_network | ||
| image: caddy:latest | ||
| container_name: gatus_proxy | ||
| ports: | ||
| - 8080:8080 | ||
| configs: | ||
| - source: caddyfile | ||
| target: /etc/caddy/Caddyfile | ||
| gatus: | ||
| networks: | ||
| - caddy_network | ||
| image: twinproduction/gatus:latest | ||
| container_name: gatus_behind_proxy | ||
|
|
||
| volumes: | ||
| - ../../config.yml:/config/02_config.yaml | ||
| environment: | ||
| - GATUS_CONFIG_PATH=/config | ||
| configs: | ||
| - source: gatus_config_ext | ||
| target: /config/01_config.yaml | ||
|
|
||
| configs: | ||
| gatus_config_ext: | ||
| content: | | ||
| web: | ||
| base-path: /gatus/ | ||
| caddyfile: | ||
| content: | | ||
| { | ||
| auto_https off | ||
| http_port 8080 | ||
| } | ||
|
|
||
| http://localhost:8080 { | ||
| handle_path /gatus/* { | ||
| reverse_proxy http://gatus_behind_proxy:8080 | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.