web.override for branding

runtracca year ago

Hello guys, I'm curious is it possible to use something like this in my config and change the logo for example:

<entry key='web.override'>/home/user/traccar/override/logo.svg</entry>

I tried but didn't work, not sure if I understand the option correctly?

Anton Tananaeva year ago

No, it has to point to a directory. And then in the directory you can have logo.svg.

runtracca year ago

Great, thank you! Will try this

runtracca year ago

I added 7 correct size/format pictures in folder /home/user/traccar/branding and renamed them as the list below

    apple-touch-icon-180x180.png 
    favicon.ico
    logo.svg
    maskable-icon-512x512.png
    pwa-192x192.png
    pwa-512x512.png
    pwa-64x64.png

<entry key='web.override'>/home/user/traccar/branding</entry> is my config entry.

Stopped, removed all containers, ran compse up -d again and nothing has changed. Am I missing something?

Anton Tananaeva year ago

Not sure about containers part, but the configuration part looks good.

runtracca year ago

Thank you, I'll keep play with it

runtracca year ago

I can't make it work even with default traccar docker run command/config. Nothing changes, no error logs, svg logo is 300x300px, path is correct. If anyone have an idea what should I try I would be grateful.

Anton Tananaeva year ago

You haven't really shared details on how you mount that folder to the docker container. I suspect that might be the issue.

runtracca year ago

Maybe I'm doing it wrong

-v /home/user/traccar/branding:/opt/traccar/override:rw

tried both paths in config file - no luck

runtracca year ago

Also tried
-v /home/user/traccar/branding:/opt/traccar/modern:rw

tested both paths in config file - no luck

runtracca year ago

Inside docker container:
o1.png

My config file:
o2.png

Nothing changed on site

Anton Tananaeva year ago

And you cleared the browser cache?

runtracca year ago

Yes, tried different browser also. Here is my log, some systemd error not sure if it's relevant.
o3.png

Anton Tananaeva year ago

And you're sure that your config is also mapped?

runtracca year ago

Config location:
o4.png

Docker run conmmand:

docker run \
--name traccar \
--hostname traccar \
--detach --restart unless-stopped \
--publish 80:8082 \
--publish 5000-5150:5000-5150 \
--publish 5000-5150:5000-5150/udp \
--volume /opt/traccar/logs:/opt/traccar/logs:rw \
--volume /opt/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro \
--volume /home/user/traccar/branding:/opt/traccar/override:rw \
traccar/traccar:latest