Configure telegram with docker

Lummi2 days ago

I have a docker-compose.yaml file which runs traccar for me. The docs say tp add telegram notifications that I should edit /opt/traccar/conf but that doesn't apply for docker unless I exec into the container. I suspect I need to add a pameter into the the compose file but im not sure what to specify for the telegram config parameters.

Turbovix2 days ago

According to the documentation on GitHub, you must mount the "conf" directory with the host.

--volume /opt/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro \

https://github.com/traccar/traccar-docker

Turbovix2 days ago

See my setup:

 environment:
      - TZ=America/Sao_Paulo
    ports:
      - 33318:33318
      - 8082:8082
      - 5011:5011
      - 5055:5055
      - 5013:5013
      - 5027:5027
    volumes:
      - /home/user/satvix/logs/:/opt/traccar/logs:rw
      - /home/user/satvix/conf/traccar.xml:/opt/traccar/conf/traccar.xml:ro
      - /home/user/satvix/templates/:/opt/traccar/templates
      - /home/user/satvix/media/:/opt/traccar/media
      - /home/user/satvix/web/:/opt/traccar/web
Anton Tananaev2 days ago

You can also use environment variables to configure docker.