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

data not persistent #1

Open
airdogvan opened this issue Jun 21, 2020 · 0 comments
Open

data not persistent #1

airdogvan opened this issue Jun 21, 2020 · 0 comments

Comments

@airdogvan
Copy link

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.

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

1 participant