Override static_favicon_dir_by_host setting built by galaxyproject.galaxy role#1996
Override static_favicon_dir_by_host setting built by galaxyproject.galaxy role#1996kysrpex wants to merge 1 commit intousegalaxy-eu:masterfrom
static_favicon_dir_by_host setting built by galaxyproject.galaxy role#1996Conversation
6a0f599 to
bd2b2f0
Compare
….galaxy` role
The Galaxy role `galaxyproject.galaxy` builds values for the setting `static_favicon_dir_by_host` that point to `'{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}'` for each subdomain.
That is by itself wrong, because `static_favicon_dir` is expected to point to the ICO file, not the directory that contains it. Even if that problem was fixed appending "/favicon.ico" to the built values, the configuration values would still not work if the favicon is not located at '{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}/favicon.ico'`, as it is the case for us.
Therefore, use a loop to define `static_favicon_dir_by_host` so that it points to the right location for each subdomain.
bd2b2f0 to
daf0345
Compare
|
Verified using TASK [galaxyproject.galaxy : Create Galaxy configuration file] **************************************************************************************************************
--- before: /opt/galaxy/config/galaxy.yml
+++ after: /home/jose/.ansible/tmp/ansible-local-707614icqeb12/tmp06xy1sny/galaxy.yml.j2
@@ -232,49 +232,49 @@
static_enabled: true
static_favicon_dir: static/favicon_eu.ico
static_favicon_dir_by_host:
- africa.usegalaxy.eu: /opt/galaxy/server/static-africa
- annotation.usegalaxy.eu: /opt/galaxy/server/static-annotation
- aqua.usegalaxy.eu: /opt/galaxy/server/static-aqua
- assembly.usegalaxy.eu: /opt/galaxy/server/static-assembly
- astronomy.usegalaxy.eu: /opt/galaxy/server/static-astronomy
- beta.usegalaxy.eu: /opt/galaxy/server/static-beta
- biodiversity-genomics.usegalaxy.eu: /opt/galaxy/server/static-biodiversity-genomics
- cancer.usegalaxy.eu: /opt/galaxy/server/static-cancer
- cheminformatics.usegalaxy.eu: /opt/galaxy/server/static-cheminformatics
- climate.usegalaxy.eu: /opt/galaxy/server/static-climate
- clipseq.usegalaxy.eu: /opt/galaxy/server/static-clipseq
- covid19.usegalaxy.eu: /opt/galaxy/server/static-covid19
- earth-system.usegalaxy.eu: /opt/galaxy/server/static-earth-system
- ecology.usegalaxy.eu: /opt/galaxy/server/static-ecology
- eirene.usegalaxy.eu: /opt/galaxy/server/static-eirene
- erasmusmc.usegalaxy.eu: /opt/galaxy/server/static-erasmusmc
- ghana.usegalaxy.eu: /opt/galaxy/server/static-ghana
- graphclust.usegalaxy.eu: /opt/galaxy/server/static-graphclust
- hicexplorer.usegalaxy.eu: /opt/galaxy/server/static-hicexplorer
- humancellatlas.usegalaxy.eu: /opt/galaxy/server/static-humancellatlas
- imaging.usegalaxy.eu: /opt/galaxy/server/static-imaging
- india.usegalaxy.eu: /opt/galaxy/server/static-india
- lite.usegalaxy.eu: /opt/galaxy/server/static-lite
- live.usegalaxy.eu: /opt/galaxy/server/static-live
- materials.usegalaxy.eu: /opt/galaxy/server/static-materials
- metabolomics.usegalaxy.eu: /opt/galaxy/server/static-metabolomics
- metagenomics.usegalaxy.eu: /opt/galaxy/server/static-metagenomics
- microbiology.usegalaxy.eu: /opt/galaxy/server/static-microbiology
- microbiome.usegalaxy.eu: /opt/galaxy/server/static-microbiome
- microgalaxy.usegalaxy.eu: /opt/galaxy/server/static-microgalaxy
- ml.usegalaxy.eu: /opt/galaxy/server/static-ml
- nanopore.usegalaxy.eu: /opt/galaxy/server/static-nanopore
- nubri.usegalaxy.eu: /opt/galaxy/server/static-nubri
- phage.usegalaxy.eu: /opt/galaxy/server/static-phage
- plants.usegalaxy.eu: /opt/galaxy/server/static-plants
- proteomics.usegalaxy.eu: /opt/galaxy/server/static-proteomics
- rna.usegalaxy.eu: /opt/galaxy/server/static-rna
- singlecell.usegalaxy.eu: /opt/galaxy/server/static-singlecell
- spatialomics.usegalaxy.eu: /opt/galaxy/server/static-spatialomics
- streetscience.usegalaxy.eu: /opt/galaxy/server/static-streetscience
- test.usegalaxy.eu: /opt/galaxy/server/static-test
- usegalaxy.eu: /opt/galaxy/server/static
- virology.usegalaxy.eu: /opt/galaxy/server/static-virology
+ africa.usegalaxy.eu: /opt/galaxy/server/static-africa/favicon_eu.ico
+ annotation.usegalaxy.eu: /opt/galaxy/server/static-annotation/favicon_eu.ico
+ aqua.usegalaxy.eu: /opt/galaxy/server/static-aqua/favicon_eu.ico
+ assembly.usegalaxy.eu: /opt/galaxy/server/static-assembly/favicon_eu.ico
+ astronomy.usegalaxy.eu: /opt/galaxy/server/static-astronomy/favicon_eu.ico
+ beta.usegalaxy.eu: /opt/galaxy/server/static-beta/favicon_eu.ico
+ biodiversity-genomics.usegalaxy.eu: /opt/galaxy/server/static-biodiversity-genomics/favicon_eu.ico
+ cancer.usegalaxy.eu: /opt/galaxy/server/static-cancer/favicon_eu.ico
+ cheminformatics.usegalaxy.eu: /opt/galaxy/server/static-cheminformatics/favicon_eu.ico
+ climate.usegalaxy.eu: /opt/galaxy/server/static-climate/favicon_eu.ico
+ clipseq.usegalaxy.eu: /opt/galaxy/server/static-clipseq/favicon_eu.ico
+ covid19.usegalaxy.eu: /opt/galaxy/server/static-covid19/favicon_eu.ico
+ earth-system.usegalaxy.eu: /opt/galaxy/server/static-earth-system/favicon_eu.ico
+ ecology.usegalaxy.eu: /opt/galaxy/server/static-ecology/favicon_eu.ico
+ eirene.usegalaxy.eu: /opt/galaxy/server/static-eirene/favicon_eu.ico
+ erasmusmc.usegalaxy.eu: /opt/galaxy/server/static-erasmusmc/favicon_eu.ico
+ ghana.usegalaxy.eu: /opt/galaxy/server/static-ghana/favicon_eu.ico
+ graphclust.usegalaxy.eu: /opt/galaxy/server/static-graphclust/favicon_eu.ico
+ hicexplorer.usegalaxy.eu: /opt/galaxy/server/static-hicexplorer/favicon_eu.ico
+ humancellatlas.usegalaxy.eu: /opt/galaxy/server/static-humancellatlas/favicon_eu.ico
+ imaging.usegalaxy.eu: /opt/galaxy/server/static-imaging/favicon_eu.ico
+ india.usegalaxy.eu: /opt/galaxy/server/static-india/favicon_eu.ico
+ lite.usegalaxy.eu: /opt/galaxy/server/static-lite/favicon_eu.ico
+ live.usegalaxy.eu: /opt/galaxy/server/static-live/favicon_eu.ico
+ materials.usegalaxy.eu: /opt/galaxy/server/static-materials/favicon_eu.ico
+ metabolomics.usegalaxy.eu: /opt/galaxy/server/static-metabolomics/favicon_eu.ico
+ metagenomics.usegalaxy.eu: /opt/galaxy/server/static-metagenomics/favicon_eu.ico
+ microbiology.usegalaxy.eu: /opt/galaxy/server/static-microbiology/favicon_eu.ico
+ microbiome.usegalaxy.eu: /opt/galaxy/server/static-microbiome/favicon_eu.ico
+ microgalaxy.usegalaxy.eu: /opt/galaxy/server/static-microgalaxy/favicon_eu.ico
+ ml.usegalaxy.eu: /opt/galaxy/server/static-ml/favicon_eu.ico
+ nanopore.usegalaxy.eu: /opt/galaxy/server/static-nanopore/favicon_eu.ico
+ nubri.usegalaxy.eu: /opt/galaxy/server/static-nubri/favicon_eu.ico
+ phage.usegalaxy.eu: /opt/galaxy/server/static-phage/favicon_eu.ico
+ plants.usegalaxy.eu: /opt/galaxy/server/static-plants/favicon_eu.ico
+ proteomics.usegalaxy.eu: /opt/galaxy/server/static-proteomics/favicon_eu.ico
+ rna.usegalaxy.eu: /opt/galaxy/server/static-rna/favicon_eu.ico
+ singlecell.usegalaxy.eu: /opt/galaxy/server/static-singlecell/favicon_eu.ico
+ spatialomics.usegalaxy.eu: /opt/galaxy/server/static-spatialomics/favicon_eu.ico
+ streetscience.usegalaxy.eu: /opt/galaxy/server/static-streetscience/favicon_eu.ico
+ test.usegalaxy.eu: /opt/galaxy/server/static-test/favicon_eu.ico
+ usegalaxy.eu: static/favicon_eu.ico
+ virology.usegalaxy.eu: /opt/galaxy/server/static-virology/favicon_eu.ico
static_images_dir_by_host:
africa.usegalaxy.eu: /opt/galaxy/server/static-africa/images
annotation.usegalaxy.eu: /opt/galaxy/server/static-annotation/images
changed: [sn09.galaxyproject.eu] |
|
Do we want to support different favicons for different subdomains? If so how could users contribute a new favicon? If not we could just point to one single file, isn't it? |
|
I was in the process of verifying the change for usegalaxy.eu and virology.usegalaxy.eu live to the values set by Ansible, but it seems somebody has deployed the CI while I was doing it :(. Please @gsaudade99 test tomorrow if u can (change values and restart gunicorns in rollout fashion). If it works then this is no longer a draft and can be merged. |
|
Thank you for committing this patch, it looks like it fixes our issue. I have the feeling that this should be also fixed upstream somehow, but I would say this is not a priority. |
|
I have tested this for virology, I'm not entirely sure that this will fix sense the favicon is statically served by nginx. |
That's true so let's make #2003 a precondition for this PR. |
The Galaxy role
galaxyproject.galaxybuilds values for the settingstatic_favicon_dir_by_hostthat point to'{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}'for each subdomain.That is by itself wrong, because
static_favicon_diris expected to point to the ICO file, not the directory that contains it. Even if that problem was fixed appending "/favicon.ico" to the built values, the configuration values would still not work if the favicon is not located at'{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}/favicon.ico', as it is the case for us.Therefore, use a loop to define
static_favicon_dir_by_hostso that it points to the right location for each subdomain.Closes https://github.com/usegalaxy-eu/issues/issues/919.
EDIT:⚠️ Requires #2003.