forked from kurupted/google-maps-timeline-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (69 loc) · 1.86 KB
/
docker-compose.yml
File metadata and controls
87 lines (69 loc) · 1.86 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
# Generated by GitHub Copilot (GPT-5)
# Docker Compose configuration for Google Maps Timeline Viewer
# This file defines the services, volumes, and secrets for the application
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
platforms:
- linux/amd64
- linux/arm64
image: google-maps-timeline-viewer:latest
container_name: timeline-viewer
restart: unless-stopped
ports:
- "8080:8080"
volumes:
# Persistent data storage (database, photos, logs)
- timeline-data:/data
# Timeline JSON files
- timeline-files:/data/timeline
secrets:
- google_api_key
environment:
# API key configuration (uses Docker secret)
GOOGLE_MAPS_API_KEY_FILE: /run/secrets/google_api_key
# Cache configuration
CACHE_TTL_DAYS: 180
# API quota limits
DAILY_API_QUOTA: 5000
# Prefetch configuration
MAX_CONCURRENT_FETCHES: 5
API_REQUEST_DELAY_MS: 200
# Photo sizes
PHOTO_SIZES: "150,400,800,1200"
# Image quality
WEBP_QUALITY: 85
JPEG_QUALITY: 80
# Logging
LOG_LEVEL: info
# Server
PORT: 3000
NODE_ENV: production
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '1'
memory: 1G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
# Persistent data volume for cache database, photos, and logs
timeline-data:
driver: local
# Volume for timeline JSON files
timeline-files:
driver: local
secrets:
# Google Maps API key loaded from file
google_api_key:
file: ./secrets/google_api_key.txt