发布 Traccar 轨迹

Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
2024-10-17 12:58:43 +08:00
parent 43a180702f
commit 5c8d81dd6c
11 changed files with 240 additions and 2 deletions
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
<!-- Documentation: https://www.traccar.org/configuration-file/ -->
<entry key='database.driver'>org.h2.Driver</entry>
<entry key='database.url'>jdbc:h2:./data/database</entry>
<entry key='database.user'>sa</entry>
<entry key='database.password'></entry>
</properties>
+17
View File
@@ -0,0 +1,17 @@
additionalProperties:
formFields:
- default: "/home/traccar"
edit: true
envKey: TRACCAR_ROOT_PATH
labelZh: 数据持久化路径
labelEn: Data persistence path
required: true
type: text
- default: 8082
edit: true
envKey: PANEL_APP_PORT_HTTP
labelZh: WebUI 端口
labelEn: WebUI port
required: true
rule: paramPort
type: number
+24
View File
@@ -0,0 +1,24 @@
networks:
1panel-network:
external: true
services:
traccar:
image: traccar/traccar:6.5
container_name: ${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
hostname: traccar
ports:
- ${PANEL_APP_PORT_HTTP}:8082
- 5000-5150:5000-5150
- 5000-5150:5000-5150/udp
env_file:
- /etc/1panel/envs/global.env
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${TRACCAR_ROOT_PATH}/logs:/opt/traccar/logs:rw
- ${TRACCAR_ROOT_PATH}/traccar.xml:/opt/traccar/conf/traccar.xml:ro
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
if [ -f .env ]; then
source .env
# setup-1 add default values
CURRENT_DIR=$(pwd)
sed -i '/^ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
if [ -f .env ]; then
source .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
if [ -f .env ]; then
source .env
# setup-1 add default values
CURRENT_DIR=$(pwd)
sed -i '/^ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi