This is my docker-compose file:
version: "3"
services:
db:
image: mysql:8.0.13
container_name: db
command: --default-authentication-plugin=mysql_native_password
restart: always
env_file: .env
volumes:
- /etc/localtime:/etc/localtime:ro
- db-datavolume:/var/lib/mysql
- ./mysql:/etc/mysql/conf.d
ports:
- "3306:3306"
traccar:
image: traccar/traccar:4.8-alpine
container_name: traccar
depends_on:
- db
restart: always
volumes:
- ./traccar/conf/traccar.xml:/opt/traccar/conf/traccar.xml:ro
- /var/log/traccar:/opt/traccar/logs:rw
- ./traccar/web/favicon.ico:/opt/traccar/web/favicon.ico:ro
- ./traccar/web/icon.png:/opt/traccar/web/icon.png:ro
- ./traccar/web/logo.svg:/opt/traccar/web/logo.svg:ro
- ./traccar/web/release.html:/opt/traccar/web/release.html:ro
- ./traccar/web/app.css:/opt/traccar/web/app.css:ro
ports:
- "5002-5150:5002-5150"
- "8083:8082"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
db-datavolume:
When I do a docker-compose down
and then
docker-compose up
All the data (users, devices,etc.) disappears and I have to reenter it again.
Which I don't understand since there is a volume for the db.
Is there a routine in the traccar server that reinitializes the db every time it starts? Doesn't make sense to me.
Apart from that small detail everything runs fine.
This is my docker-compose file:
version: "3"
services:
db:
image: mysql:8.0.13
container_name: db
command: --default-authentication-plugin=mysql_native_password
restart: always
env_file: .env
volumes:
- /etc/localtime:/etc/localtime:ro
- db-datavolume:/var/lib/mysql
- ./mysql:/etc/mysql/conf.d
ports:
- "3306:3306"
volumes:
db-datavolume:
When I do a docker-compose down
and then
docker-compose up
All the data (users, devices,etc.) disappears and I have to reenter it again.
Which I don't understand since there is a volume for the db.
Is there a routine in the traccar server that reinitializes the db every time it starts? Doesn't make sense to me.
Apart from that small detail everything runs fine.