-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.docker.example
More file actions
174 lines (135 loc) · 6.62 KB
/
Copy path.env.docker.example
File metadata and controls
174 lines (135 loc) · 6.62 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
APP_NAME=Mileage Logger
# Use production for real deployments. Production mode requires non-default secrets and web login.
APP_ENV=production
# Signs browser sessions. Replace the generated value only with a long random secret.
SECRET_KEY=change-me
# Controls month/day boundaries, dashboard dates, PDF dates, and displayed local times.
LOCAL_TIMEZONE=America/Detroit
# Leave false in Docker. Alembic migrations create/update schema on startup.
CREATE_TABLES_ON_STARTUP=false
LOG_LEVEL=info
# Keep local-postgres to deploy the bundled PostgreSQL container.
# Set this blank and point DATABASE_URL at a network PostgreSQL server for remote database mode.
COMPOSE_PROFILES=local-postgres
# Docker Swarm stack deployments cannot build from source. Build/tag these locally for a
# single-node Swarm, or set them to registry images available to every Swarm node.
APP_IMAGE=ghcr.io/cosmicc/mileage-logger-app:1.4.3
NGINX_IMAGE=ghcr.io/cosmicc/mileage-logger-nginx:1.4.3
# Swarm mlapp-container identity. Match these to the owner of HOST_DATA_DIR on shared storage.
APP_UID=1000
APP_GID=100
# Single web UI login account for dashboard, reports, diagnostics, backup, and restore.
WEB_LOGIN_USERNAME=admin
WEB_LOGIN_PASSWORD=change-web-login-password
# Set true when the public browser URL is HTTPS so session cookies are HTTPS-only.
WEB_SESSION_COOKIE_SECURE=true
# Temporary lockout controls for repeated failed web logins from the same client.
WEB_LOGIN_MAX_ATTEMPTS=5
WEB_LOGIN_LOCKOUT_SECONDS=300
# Optional WebAuthn/passkey settings. Leave RP fields blank unless the browser origin needs an override.
PASSKEY_RP_NAME=Mileage Logger
PASSKEY_RP_ID=
PASSKEY_ORIGIN=
# Cloudflare IP blocking uses a Cloudflare API token, not the Cloudflare Tunnel token.
# Required token permission: Account Firewall Access Rules Write for the target zone.
# When enabled, failed-login IPs can be blocked from Diagnostics or after the auto-block threshold.
CLOUDFLARE_IP_BLOCKING_ENABLED=false
CLOUDFLARE_API_TOKEN=
CLOUDFLARE_ZONE_ID=
# Trusted IPs/CIDRs that the app must never block through Cloudflare.
CLOUDFLARE_IP_BLOCK_ALLOWLIST=
CLOUDFLARE_AUTO_BLOCK_FAILED_LOGIN_ATTEMPTS=5
# Optional Pushover app-health notifications for degraded or restored app state.
# Use PUSHOVER_TOKEN for the Pushover app API token and PUSHOVER_USER for the user/group key.
# PUSHOVER_APP_KEY and PUSHOVER_USER_KEY are accepted aliases if that wording is preferred.
PUSHOVER_ENABLED=false
PUSHOVER_TOKEN=
PUSHOVER_USER=
PUSHOVER_APP_KEY=
PUSHOVER_USER_KEY=
PUSHOVER_DEVICE=
PUSHOVER_PRIORITY=0
PUSHOVER_TIMEOUT_SECONDS=10
# App-health notification thresholds. Critical findings render red on Diagnostics.
APP_HEALTH_MONITOR_INTERVAL_SECONDS=60
APP_HEALTH_DB_LATENCY_WARNING_MS=500
APP_HEALTH_DB_LATENCY_CRITICAL_MS=2000
APP_HEALTH_DB_LATENCY_SUSTAINED_SECONDS=15
APP_HEALTH_DISK_WARNING_FREE_MB=1000
APP_HEALTH_DISK_CRITICAL_FREE_MB=250
APP_HEALTH_STATE_PATH=/data/app-health-state.json
# Bearer token for non-OwnTracks API routes. Public nginx still blocks those routes by default.
WEB_API_KEY=change-web-api-key
# Local PostgreSQL container settings. Ignored when COMPOSE_PROFILES is blank for remote DB mode.
POSTGRES_DB=mileage_logger
POSTGRES_USER=mileage
POSTGRES_PASSWORD=change-postgres-password
# Main app database connection. For remote PostgreSQL, use the remote host and URL-encode passwords.
DATABASE_URL=postgresql+psycopg://mileage:change-postgres-password@postgres:5432/mileage_logger
# SQLAlchemy connection pool settings. Defaults are conservative for local or small remote databases.
DATABASE_POOL_SIZE=5
DATABASE_MAX_OVERFLOW=10
DATABASE_POOL_TIMEOUT_SECONDS=30
DATABASE_POOL_RECYCLE_SECONDS=1800
DATABASE_CONNECT_TIMEOUT_SECONDS=10
# Startup wait before entering database-outage mode when PostgreSQL is unavailable.
DB_WAIT_TIMEOUT_SECONDS=60
# Healthcheck grace period. Keep this longer than DB_WAIT_TIMEOUT_SECONDS so Swarm does not
# restart the app while the entrypoint is waiting before limp mode.
APP_HEALTHCHECK_START_PERIOD=90s
# OwnTracks HTTP protection. OwnTracks HTTP mode requires Basic Auth plus payload encryption.
OWNTRACKS_USERNAME=owntracks
OWNTRACKS_PASSWORD=change-owntracks-password
OWNTRACKS_ENCRYPTION_KEY=change-owntracks-encryption-key
# Import OwnTracks waypoints into the app and default new waypoint radius in meters.
OWNTRACKS_SYNC_WAYPOINTS=true
OWNTRACKS_DEFAULT_SITE_RADIUS_M=150
# Background processor that turns OwnTracks waypoint leave/enter events into trips.
AUTOMATIC_TRIP_PROCESSING_ENABLED=true
AUTOMATIC_TRIP_PROCESSING_INTERVAL_SECONDS=60
# Raw OwnTracks location/event cleanup. The app enforces at least 90 days retention.
OWNTRACKS_PURGE_ENABLED=true
OWNTRACKS_LOCATION_RETENTION_DAYS=90
# Trip detection tuning: destination dwell time and minimum movement before travel is considered active.
OWNTRACKS_WAYPOINT_DWELL_MINUTES=5
OWNTRACKS_TRAVEL_DISTANCE_M=50.0
# Fuel price source configuration.
GAS_PRICE_STATE=MI
# Extra dollars per gallon added to provider fuel prices before reimbursement calculations.
GAS_PRICE_BUFFER=0.50
# aaa_current uses the built-in AAA Michigan scraper. eia requires EIA_API_KEY and EIA_SERIES_ID.
GAS_PRICE_SOURCE=aaa_current
EIA_API_KEY=
EIA_SERIES_ID=
# Fuel economy used by reimbursement: monthly trip miles / MPG * monthly gas price.
VEHICLE_MPG=25.0
# Optional name shown as Submitted by on generated PDF reports.
REPORT_DISPLAY_NAME=
# Background gas-price snapshots for monthly averages.
GAS_SNAPSHOT_ENABLED=true
GAS_SNAPSHOT_INTERVAL_SECONDS=86400
GAS_SNAPSHOT_RUN_ON_STARTUP=true
# Persistent app data and a separate automatic-backup directory. Logs use stdout/stderr.
APP_DATA_DIR=/data
HOST_DATA_DIR=/var/lib/mileage-logger
HOST_BACKUP_DIR=/var/lib/mileage-logger/backups
# Maximum uploaded Diagnostics restore file size, in bytes.
MAX_BACKUP_RESTORE_BYTES=262144000
# Automatic full-data backups shown on Diagnostics. Default path is inside APP_DATA_DIR.
AUTOMATIC_BACKUPS_ENABLED=true
AUTOMATIC_BACKUP_DIR=/data/backups
AUTOMATIC_BACKUP_RETRY_SECONDS=60
# Local loopback port published by nginx. Cloudflare Tunnel should target this port.
HTTP_PORT=80
# Optional web UI IP allowlist. Leave blank to allow all clients.
# Public nginx only exposes OwnTracks POST endpoints under /api/.
# Other /api/ routes remain internal to the app container for health checks and local diagnostics.
# Example: WEB_ALLOWED_CIDRS=192.168.1.0/24,10.8.0.0/24,203.0.113.44/32
WEB_ALLOWED_CIDRS=
# Required Cloudflare Tunnel container token from the Cloudflare dashboard.
# The Compose stack will not start until this value is set.
CLOUDFLARED_TUNNEL_TOKEN=
# Optional Cloudflare Tunnel runtime settings.
CLOUDFLARED_LOG_LEVEL=info
CLOUDFLARED_METRICS=
CLOUDFLARED_TRANSPORT_PROTOCOL=auto