web.override for branding

runtracc2 months 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 Tananaev2 months ago

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

runtracc2 months ago

Great, thank you! Will try this

runtracc2 months 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 Tananaev2 months ago

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

runtracc2 months ago

Thank you, I'll keep play with it

runtracc2 months 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 Tananaev2 months ago

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

runtracc2 months ago

Maybe I'm doing it wrong

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

tried both paths in config file - no luck

runtracc2 months ago

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

tested both paths in config file - no luck

runtracc2 months ago

Inside docker container:
o1.png

My config file:
o2.png

Nothing changed on site

Anton Tananaev2 months ago

And you cleared the browser cache?

runtracc2 months ago

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

Anton Tananaev2 months ago

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

runtracc2 months 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