Compare commits

..

3 Commits

Author SHA1 Message Date
b8b89ef56e feat(traccar): Typo 2025-03-05 02:32:03 +01:00
472554d264 feat(traccar): Update to Traccar 6 2025-03-05 02:31:29 +01:00
90afffb41c feat(traccar): Update to Traccar 6 2025-03-05 02:28:20 +01:00
14 changed files with 55 additions and 24 deletions

View File

@@ -13,7 +13,7 @@ When everything's ready start Traccar with Docker Compose, otherwise head down t
export COMPOSE_DIR='/opt/containers/traccar'
export COMPOSE_CTX='ux_vilnius'
export COMPOSE_PROJECT='traccar-'"${COMPOSE_CTX}"
export COMPOSE_FILE="${COMPOSE_DIR}"'/docker-compose.yml'
export COMPOSE_FILE="${COMPOSE_DIR}"'/compose.yaml'
export COMPOSE_ENV=<add accordingly>
```
@@ -29,7 +29,7 @@ docker context create fully.qualified.domain.name --docker 'host=ssh://root@full
Pull both Traccar and MySQL:
```
docker compose --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --env-file "${COMPOSE_ENV}" --profile 'full' pull
docker --project-name "${COMPOSE_PROJECT}" --file "${COMPOSE_FILE}" --env-file "${COMPOSE_ENV}" --profile 'full' pull
```
## Copy to target

View File

@@ -0,0 +1,4 @@
ARG MYSQL_VERSION
FROM "mysql:${MYSQL_VERSION}"
RUN mkdir -p /tmp/mysql

View File

View File

@@ -0,0 +1,5 @@
[mysqld]
innodb_buffer_pool_size = 512M
innodb_redo_log_capacity = 512M
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 0

View File

View File

@@ -0,0 +1,14 @@
# For the remainder of this Dockerfile EXAMPLE_ARG_FOR_DOCKERFILE will be
# available with a value of 'must_be_available_in_dockerfile', check out the env
# file at 'env/fully.qualified.domain.name.example' for reference.
# ARG EXAMPLE_ARG_FOR_DOCKERFILE
# Another env var, this one's needed in the example build step below:
# ARG TRACCAR_VERSION
# Example
# FROM "traccar:${TRACCAR_VERSION}"
# RUN apt-get update && \
# apt-get -y install \
# somepackage-6.q16-6-extra && \
# rm -rf /var/lib/apt/lists/*

View File

@@ -0,0 +1,26 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
<entry key='config.default'>./conf/default.xml</entry>
<!--
This is the main configuration file. All your configuration parameters should be placed in this file.
Default configuration parameters are located in the "default.xml" file. You should not modify it to avoid issues
with upgrading to a new version. Parameters in the main config file override values in the default file. Do not
remove "config.default" parameter from this file unless you know what you are doing.
For list of available parameters see following page: https://www.traccar.org/configuration-file/
-->
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://mysql/traccar?zeroDateTimeBehavior=round&amp;serverTimezone=UTC&amp;allowPublicKeyRetrieval=true&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
<entry key='database.user'>traccar</entry>
<entry key='database.password'>t0psecret</entry>
</properties>

View File

View File

@@ -8,4 +8,4 @@ services:
max-size: "10m"
max-file: "10"
compress: "true"
restart: "${RESTARTPOLICY:-unless-stopped}"
restart: "${RESTARTPOLICY:-always}"

View File

@@ -11,7 +11,7 @@ services:
soft: ${ULIMIT_NPROC-65535}
hard: ${ULIMIT_NPROC-65535}
extends:
file: common-settings.yml
file: common-settings.yaml
service: common-settings
ports:
- "${TRACCAR_WEBUI_PORT}:8082"
@@ -35,15 +35,14 @@ services:
soft: ${ULIMIT_NPROC-65535}
hard: ${ULIMIT_NPROC-65535}
extends:
file: common-settings.yml
file: common-settings.yaml
service: common-settings
ports:
- "${MYSQL_PORT}:3306"
volumes:
- /opt/docker-data/traccar-${CONTEXT}/mysql/config/db:/etc/mysql/conf.d
- /opt/docker-data/traccar-${CONTEXT}/mysql/config/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- /opt/docker-data/traccar-${CONTEXT}/mysql/data/datadir:/var/lib/mysql
- /opt/docker-data/traccar-${CONTEXT}/mysql/data/tmpdir:/tmp/mysql
- /opt/docker-data/traccar-${CONTEXT}/mysql/data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}

View File

@@ -1,17 +0,0 @@
services:
traccar-build:
image: "traccar/traccar:${TRACCAR_VERSION}"
profiles: ["build", "build-traccar"]
build:
context: "build-context/traccar"
dockerfile: Dockerfile
args:
TRACCAR_VERSION: "${TRACCAR_VERSION}"
mysql-build:
image: "mysql:${MYSQL_VERSION}"
profiles: ["build", "build-mysql"]
build:
context: "build-context/mysql"
dockerfile: Dockerfile
args:
MYSQL_VERSION: "${MYSQL_VERSION}"