Merge pull request #50 from hunter-hunter/docker-run-db

Update README.md
pull/51/head
Anton Tananaev 4 years ago committed by GitHub
commit 0c2d7e3348
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -64,6 +64,13 @@ Official website: <https://www.traccar.org>
traccar/traccar:latest
```
### Database
The default when executing the above `docker run` command is an internal H2 database but this should only be for basic use.
The `docker run` command also doesn't create a mount point on the host for the data folder which will cause the database to be lost when the container is recreated. This point can be mitigated by adding the line `-v /var/docker/traccar/data:/opt/traccar/data:rw \` after `-v /var/docker/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro \` but it will still be using the H2 database.
The **recommended solution** for production use is to link to an external MySQL database and update the configuration .xml file according to the [Traccar MySQL documentation](https://www.traccar.org/mysql/) and using the `docker run` command as-is.
### Default JVM options:
- -Xms512m
- -Xmx512m

Loading…
Cancel
Save