Skip to content

Commit

Permalink
Make dashboards available on main domain (not subdomain)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemoden committed Sep 15, 2024
1 parent feae98d commit a74931a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion roles/dashy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- "{{ dashy_data_directory }}/conf.yml:/app/public/conf.yml:rw"
labels:
traefik.enable: "{{ dashy_available_externally | string }}"
traefik.http.routers.dashy.rule: "Host(`{{ dashy_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.dashy.rule: "Host(`{{ homepage_hostname }}{% if homepage_hostname != '' %}.{% endif %}{{ ansible_nas_domain }}`)"
traefik.http.routers.dashy.tls.certresolver: "letsencrypt"
traefik.http.routers.dashy.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.dashy.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/heimdall/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
memory: "{{ heimdall_memory }}"
labels:
traefik.enable: "{{ heimdall_available_externally | string }}"
traefik.http.routers.heimdall.rule: "Host(`{{ heimdall_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.heimdall.rule: "Host(`{{ heimdall_hostname }}{% if heimdall_hostname != '' %}.{% endif %}{{ ansible_nas_domain }}`)"
traefik.http.routers.heimdall.tls.certresolver: "letsencrypt"
traefik.http.routers.heimdall.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.heimdall.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/homepage/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
memory: "{{ homepage_memory }}"
labels:
traefik.enable: "{{ homepage_available_externally | string }}"
traefik.http.routers.homepage.rule: "Host(`{{ homepage_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.homepage.rule: "Host(`{{ homepage_hostname }}{% if homepage_hostname != '' %}.{% endif %}{{ ansible_nas_domain }}`)"
traefik.http.routers.homepage.tls.certresolver: "letsencrypt"
traefik.http.routers.homepage.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.homepage.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/organizr/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
memory: "{{ organizr_memory }}"
labels:
traefik.enable: "{{ organizr_available_externally | string }}"
traefik.http.routers.organizr.rule: "Host(`{{ organizr_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.organizr.rule: "Host(`{{ organizr_hostname }}{% if organizr_hostname != '' %}.{% endif %}{{ ansible_nas_domain }}`)"
traefik.http.routers.organizr.tls.certresolver: "letsencrypt"
traefik.http.routers.organizr.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.organizr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
Expand Down
4 changes: 4 additions & 0 deletions website/docs/applications/dashboards/dashy.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ All the code is free and open source, and everything is thoroughly documented, y
Set `dashy_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file.

The Dashy web interface can be found at [http://ansible_nas_host_or_ip:8082](http://ansible_nas_host_or_ip:8082).

## Specific Configuration

If you are using domain name (suppose, all your apps are using `<subdomain>.example.com`), but for your main dashboard you want it to be just `example.com` (without subdomain), you can achieve this by setting `dashy_hostname` to an empty, i.e. `dashy_hostname: ''`
2 changes: 2 additions & 0 deletions website/docs/applications/dashboards/heimdall.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ The Heimdall web interface can be found at [http://ansible_nas_host_or_ip:10080]
## Specific Configuration

Heimdall defaults to port 10080 - some browsers block this port. Override `heimdall_port_http` to move it somewhere else.

If you are using domain name (suppose, all your apps are using `<subdomain>.example.com`), but for your main dashboard you want it to be just `example.com` (without subdomain), you can achieve this by setting `heimdall_hostname` to an empty, i.e. `heimdall_hostname: ''`
2 changes: 1 addition & 1 deletion website/docs/applications/dashboards/homepage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ The Homepage web interface can be found at [http://ansible_nas_host_or_ip:11111]

## Specific Configuration

Heimdall defaults to port 10080 - some browsers block this port. Override `heimdall_port_http` to move it somewhere else.
If you are using domain name (suppose, all your apps are using `<subdomain>.example.com`), but for your main dashboard you want it to be just `example.com` (without subdomain), you can achieve this by setting `homepage_hostname` to an empty, i.e. `homepage_hostname: ''`
4 changes: 4 additions & 0 deletions website/docs/applications/dashboards/organizr.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ HTPC/Homelab services organizer written in PHP.
Set `organizr_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file.

The Organizr web interface can be found at [http://ansible_nas_host_or_ip:10081](http://ansible_nas_host_or_ip:10081).

## Specific Configuration

If you are using domain name (suppose, all your apps are using `<subdomain>.example.com`), but for your main dashboard you want it to be just `example.com` (without subdomain), you can achieve this by setting `organizr_hostname` to an empty, i.e. `organizr_hostname: ''`

0 comments on commit a74931a

Please sign in to comment.