mirror of
https://github.com/smittix/intercept.git
synced 2026-04-23 22:30:00 -07:00
Persist aircraft DB under data/adsb/ for Docker volume compatibility
Move aircraft_db.json and aircraft_db_meta.json from the project root to data/adsb/ so they survive container restarts and rebuilds. Add matching volume mount to both Docker Compose profiles. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,7 @@ services:
|
||||
- ./data/weather_sat:/app/data/weather_sat
|
||||
- ./data/radiosonde:/app/data/radiosonde
|
||||
- ./data/subghz:/app/data/subghz
|
||||
- ./data/adsb:/app/data/adsb
|
||||
# Optional: mount logs directory
|
||||
# - ./logs:/app/logs
|
||||
environment:
|
||||
@@ -92,6 +93,7 @@ services:
|
||||
- ./data/weather_sat:/app/data/weather_sat
|
||||
- ./data/radiosonde:/app/data/radiosonde
|
||||
- ./data/subghz:/app/data/subghz
|
||||
- ./data/adsb:/app/data/adsb
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
- INTERCEPT_HOST=0.0.0.0
|
||||
|
||||
@@ -14,8 +14,9 @@ from urllib.request import Request, urlopen
|
||||
|
||||
logger = logging.getLogger('intercept.aircraft_db')
|
||||
|
||||
# Database file location (project root)
|
||||
DB_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
# Database file location (persisted under data/adsb/ for Docker volume compatibility)
|
||||
DB_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'data', 'adsb')
|
||||
os.makedirs(DB_DIR, exist_ok=True)
|
||||
DB_FILE = os.path.join(DB_DIR, 'aircraft_db.json')
|
||||
DB_META_FILE = os.path.join(DB_DIR, 'aircraft_db_meta.json')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user