-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (83 loc) · 2.25 KB
/
docker-compose.yml
File metadata and controls
87 lines (83 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
services:
teslaontarget:
build:
context: .
dockerfile: Dockerfile
cache_from:
- teslaontarget:latest
image: teslaontarget:latest
container_name: teslaontarget
restart: unless-stopped
user: teslauser
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
environment:
# REQUIRED: Set these values
- TAK_SERVER=${TAK_SERVER:?TAK_SERVER environment variable is required}
- TESLA_USERNAME=${TESLA_USERNAME:?TESLA_USERNAME environment variable is required}
# Optional: Customize these values
- TAK_PORT=${TAK_PORT:-8085}
- API_LOOP_DELAY=${API_LOOP_DELAY:-10}
- DEAD_RECKONING_ENABLED=${DEAD_RECKONING_ENABLED:-True}
- DEAD_RECKONING_DELAY=${DEAD_RECKONING_DELAY:-1}
- DEBUG_MODE=${DEBUG_MODE:-False}
- VEHICLE_FILTER=${VEHICLE_FILTER:-} # Comma-separated list of vehicles to track
volumes:
- tesla_data:/data:rw # Persistent storage for auth tokens
- tesla_logs:/logs:rw # Log files
tmpfs:
- /run:rw,noexec,nosuid,size=64m
- /tmp:rw,noexec,nosuid,size=64m
networks:
- tak_network
healthcheck:
test: ["CMD", "python", "-c", "import teslaontarget; print('healthy')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
labels: "service=teslaontarget"
# Optional: Run authentication separately
tesla-auth:
build:
context: .
dockerfile: Dockerfile
cache_from:
- teslaontarget:latest
image: teslaontarget:latest
container_name: tesla-auth
stdin_open: true
tty: true
user: teslauser
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
environment:
- TAK_SERVER=${TAK_SERVER:-192.168.1.100}
- TESLA_USERNAME=${TESLA_USERNAME}
volumes:
- tesla_data:/data:rw
tmpfs:
- /run:rw,noexec,nosuid,size=64m
- /tmp:rw,noexec,nosuid,size=64m
command: auth
profiles:
- auth
volumes:
tesla_data:
name: teslaontarget_data
tesla_logs:
name: teslaontarget_logs
networks:
tak_network:
driver: bridge