Skip to content
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

How can I change the logo? I am using docker compose #21736

Closed
julemole opened this issue Oct 7, 2022 · 19 comments
Closed

How can I change the logo? I am using docker compose #21736

julemole opened this issue Oct 7, 2022 · 19 comments

Comments

@julemole
Copy link

julemole commented Oct 7, 2022

I would like you to help me to change the superset logo, it is my first time using containers and I don't know how to change the logo. I've been searching and they say that with the container id you can change it. What happens is that I run superset with docker compose and apparently there are several ID and I have placed several and I get error. I appreciate if you can help me with this problem.

@aakashkumarmaple
Copy link

You need to change the icon from the superset frontend file and rebuild it. This is one of the way i can think off

@julemole
Copy link
Author

julemole commented Oct 7, 2022

I already did it and it didn't work, and I can't find a way to do it.

@romulo-brito
Copy link

Add your logo file to static/assets/images
And in the docker/superset_config.py file add a line with
APP_ICON=/static/assets/images/logo.png
Then you need to docker compose up again.

@julemole
Copy link
Author

julemole commented Oct 7, 2022

I had already made those changes, but it turns out that I was running it in non-dev mode, but now when I do the docker-compose up command it doesn't run, I don't get some kind of error either, so I don't know how to fix this. I already deleted and cloned the repository and it doesn't load, it only works in non-dev mode.

@skp163
Copy link

skp163 commented Oct 25, 2023

APP_ICON=/static/assets/images/logo.png

Same issue for me as well

@git4rb
Copy link

git4rb commented Nov 16, 2023

Achieved the task successfully. I am currently running in non-dev mode with Dockerized Superset version 3.0.1. Simply add the following lines in 'superset_config.py

## Change the app icon using a CDN
APP_ICON = "https://yourdomain.com/logo.png"  
## Change the logo
FAVICONS = [{"href": "https://yourdomain.com/favicon.png"}]

For any other configurations, obtain the key-value pairs from the file 'superset/config.py' inside the Docker container and modify accordingly, play with that. Hope this helps.

@prononext
Copy link

Is there any way to set that in the compose file directly as env instead editing the superset_config.py?

I have tried:

- SUPERSET_APP_NAME=superset
- SUPERSET_APP_ICON=https://mylogodomain.com/logo.png
- SUPERSET_LOGO_TARGET_PATH=/
- SUPERSET_LOGO_TOOLTIP=My Custom Tooltip

and

- APP_NAME=superset
- APP_ICON=https://mylogodomain.com/logo.png
- LOGO_TARGET_PATH=/
- LOGO_TOOLTIP=My Custom Tooltip

sadly no success. Would be nice if there would be any solution, that works seemless with docker.

@skp163
Copy link

skp163 commented Dec 6, 2023

Not working for me. The logo is not loading on the app. Print screen attached.
Screenshot 2023-12-06 at 10 20 32 PM

@prononext
Copy link

@skp163 what did you do exactly now? your result looks positive.

@skp163
Copy link

skp163 commented Dec 7, 2023

@prononext I just added these 2 lines of code in superset_config.py .

APP_NAME = "Superset"
APP_ICON = "https://yourdomain.com/logo.png"

@skp163
Copy link

skp163 commented Jan 5, 2024

Hy, Anyone can help me on this logo change? why it is not loading. Only showing the App name

Not working for me. The logo is not loading on the app. Print screen attached. Screenshot 2023-12-06 at 10 20 32 PM

@Rogermax
Copy link

Rogermax commented Feb 3, 2024

Hey people,
I manage to change the icon and the favicon (in my case docker) setting this in docker-compose

    volumes:
      - ./superset/superset_config.py:/app/superset_config.py
      - ./superset/logo.png:/app/superset/static/assets/images/logo.png
      - ./superset/logo.png:/app/superset/static/assets/images/favicon.png

In my docker I see that superset is under /app and cheking the web of superset I saw that is getting the resources from /static/assets/....
image

So, changing the content of superset_config.py to this:

# Visual Customizations
APP_NAME = <YOUR_APP_NAME>
APP_ICON="/static/assets/images/logo.png"
APP_ICON_WIDTH = 200
LOGO_TARGET_PATH = '/' 
LOGO_TOOLTIP = <LOGO_TOOLTIP_TEXT>

solved my problem!

Good luck!

@AHAn555
Copy link

AHAn555 commented Apr 17, 2024

u need to change place your png file in docker container (superset_app:/app/superset/static/assets/images)
thats worked for me

@rusackas
Copy link
Member

Hi all! Thanks to those who have provided all the helpful context. I'm going to close this since it's not a bug, but feel free to continue the thread as needed, or we can move it to a GitHub discussion if that's needed.

@mickymrt
Copy link

mickymrt commented Apr 24, 2024

Hi
I'm new to superset, trying to customize the log as well in docker deployment but having the same issue. Followed the steps above and also as per this link https://www.coursebytes.dev/superset/
I have copied
:~/superset$ ll superset-frontend/src/assets/images/ki-nav-brand.png -rw-rw-r-- 1 3571 Apr 18 22:13 superset-frontend/src/assets/images/ki-nav-brand.png
updated docker/pythonpath_dev/superset_config_docker.py to include
APP_ICON = "/static/assets/images/ki-nav-brand.png"
restarted superset, but he image is broken
This is very frustrating!
Even tried to replace the superset-logo-horiz.png with ki-nav-brand.png but that didn't work either.
APP_NAME = and LOGO_TOOLTIP = settings take affect ok
2024-04-25_9-34-35

I'm using nginx-proxy if that helps. I see these errors when loading
nginx-proxy-1 | nginx.1 | <examplename>.org 10.6.120.143 - - [24/Apr/2024:23:34:21 +0000] "GET /static/appbuilder/css/fontawesome/solid.min.css HTTP/2.0" 200 319 "https://<examplename>.org/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" "172.18.0.6:8088" superset_app | 172.18.0.4 - - [24/Apr/2024:23:34:21 +0000] "GET /static/appbuilder/css/ab.css HTTP/1.1" 200 294 "https://<examplename>.org/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" superset_app | 172.18.0.4 - - [24/Apr/2024:23:34:21 +0000] "GET /static/appbuilder/css/fontawesome/solid.min.css HTTP/1.1" 200 319 "https://<examplename>.org/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" superset_app | HTTPException superset_app | Traceback (most recent call last): superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request superset_app | rv = self.dispatch_request() superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1788, in dispatch_request superset_app | self.raise_routing_exception(req) superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1770, in raise_routing_exception superset_app | raise request.routing_exception # type: ignore superset_app | File "/usr/local/lib/python3.10/site-packages/flask/ctx.py", line 351, in match_request superset_app | result = self.url_adapter.match(return_rule=True) # type: ignore superset_app | File "/usr/local/lib/python3.10/site-packages/werkzeug/routing/map.py", line 652, in match superset_app | raise NotFound() from None superset_app | werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. superset_app | 2024-04-24 23:34:21,140:WARNING:superset.views.base:HTTPException superset_app | Traceback (most recent call last): superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request superset_app | rv = self.dispatch_request() superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1788, in dispatch_request superset_app | self.raise_routing_exception(req) superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1770, in raise_routing_exception superset_app | raise request.routing_exception # type: ignore superset_app | File "/usr/local/lib/python3.10/site-packages/flask/ctx.py", line 351, in match_request superset_app | result = self.url_adapter.match(return_rule=True) # type: ignore superset_app | File "/usr/local/lib/python3.10/site-packages/werkzeug/routing/map.py", line 652, in match superset_app | raise NotFound() from None superset_app | werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
please assist!

@AHAn555
Copy link

AHAn555 commented Apr 25, 2024

Hi I'm new to superset, trying to customize the log as well in docker deployment but having the same issue. Followed the steps above and also as per this link https://www.coursebytes.dev/superset/ I have copied :~/superset$ ll superset-frontend/src/assets/images/ki-nav-brand.png -rw-rw-r-- 1 3571 Apr 18 22:13 superset-frontend/src/assets/images/ki-nav-brand.png updated docker/pythonpath_dev/superset_config_docker.py to include APP_ICON = "/static/assets/images/ki-nav-brand.png" restarted superset, but he image is broken This is very frustrating! Even tried to replace the superset-logo-horiz.png with ki-nav-brand.png but that didn't work either. APP_NAME = and LOGO_TOOLTIP = settings take affect ok 2024-04-25_9-34-35

I'm using nginx-proxy if that helps. I see these errors when loading nginx-proxy-1 | nginx.1 | <examplename>.org 10.6.120.143 - - [24/Apr/2024:23:34:21 +0000] "GET /static/appbuilder/css/fontawesome/solid.min.css HTTP/2.0" 200 319 "https://<examplename>.org/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" "172.18.0.6:8088" superset_app | 172.18.0.4 - - [24/Apr/2024:23:34:21 +0000] "GET /static/appbuilder/css/ab.css HTTP/1.1" 200 294 "https://<examplename>.org/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" superset_app | 172.18.0.4 - - [24/Apr/2024:23:34:21 +0000] "GET /static/appbuilder/css/fontawesome/solid.min.css HTTP/1.1" 200 319 "https://<examplename>.org/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" superset_app | HTTPException superset_app | Traceback (most recent call last): superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request superset_app | rv = self.dispatch_request() superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1788, in dispatch_request superset_app | self.raise_routing_exception(req) superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1770, in raise_routing_exception superset_app | raise request.routing_exception # type: ignore superset_app | File "/usr/local/lib/python3.10/site-packages/flask/ctx.py", line 351, in match_request superset_app | result = self.url_adapter.match(return_rule=True) # type: ignore superset_app | File "/usr/local/lib/python3.10/site-packages/werkzeug/routing/map.py", line 652, in match superset_app | raise NotFound() from None superset_app | werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. superset_app | 2024-04-24 23:34:21,140:WARNING:superset.views.base:HTTPException superset_app | Traceback (most recent call last): superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request superset_app | rv = self.dispatch_request() superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1788, in dispatch_request superset_app | self.raise_routing_exception(req) superset_app | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1770, in raise_routing_exception superset_app | raise request.routing_exception # type: ignore superset_app | File "/usr/local/lib/python3.10/site-packages/flask/ctx.py", line 351, in match_request superset_app | result = self.url_adapter.match(return_rule=True) # type: ignore superset_app | File "/usr/local/lib/python3.10/site-packages/werkzeug/routing/map.py", line 652, in match superset_app | raise NotFound() from None superset_app | werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. please assist!

u need to copy your image by "docker cp ki-nav-brand.png superset_app:/app/superset/static/assets/images
and then update docker/pythonpath_dev/superset_config_docker.py
include
APP_ICON = "/static/assets/images/ki-nav-brand.png"
then docker-compose end, docker-compose start
or docker-compose restart

@mickymrt
Copy link

thanks heaps that works! :)

@VinhNguyenonthecloud
Copy link

VinhNguyenonthecloud commented May 19, 2024

u need to copy your image by "docker cp ki-nav-brand.png superset_app:/app/superset/static/assets/images and then update docker/pythonpath_dev/superset_config_docker.py include APP_ICON = "/static/assets/images/ki-nav-brand.png" then docker-compose end, docker-compose start or docker-compose restart

I can change the logo but the favicon doesn't work:
I use this code in superset_config.py file: FAVICONS = [{"href": "/static/assets/images/favicon.png"}]
and run: docker cp favicon.png superset_app:/app/superset/static/assets/images
but nothing happen.
image
I don't know why.

@LudvigJuelsson
Copy link

LudvigJuelsson commented Jul 17, 2024

For me, adding these two lines to the superset_config file worked:
APP_ICON="<image_url.svg>"
SUPERSET_LOGO_TARGET_PATH="<image_url.svg>"
Both of them using the same .svg image URL path.
Using k8s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests