Skip to content

fix(wefax): include station JSON in Docker image and handle missing file#210

Merged
smittix merged 1 commit intomainfrom
fix/wefax-stations-missing-in-docker
Apr 22, 2026
Merged

fix(wefax): include station JSON in Docker image and handle missing file#210
smittix merged 1 commit intomainfrom
fix/wefax-stations-missing-in-docker

Conversation

@smittix
Copy link
Copy Markdown
Owner

@smittix smittix commented Apr 21, 2026

Summary

  • Removes data/*.json from .dockerignorewefax_stations.json (and oui_database.json) are static reference data shipped with the app, not runtime output, so they should be bundled in the image
  • Adds a file-existence check in load_stations() so a missing file logs a warning and returns an empty list gracefully instead of crashing with an unhandled FileNotFoundError

Root cause

.dockerignore excluded data/*.json, so wefax_stations.json was never copied into the container during docker build. The docker-compose.yml volume mounts only cover specific subdirectories (weather_sat, adsb, etc.) and not the file itself. At runtime, load_stations() would throw FileNotFoundError, the /wefax/stations route returned a 500, and the JS silently rendered empty station/frequency dropdowns.

Fixes #209

Test plan

  • docker compose --profile basic up -d --build — station dropdown populates on the WeFax page
  • Verify oui_database.json is also present in the image (Bluetooth OUI lookup unaffected)

🤖 Generated with Claude Code

data/*.json was excluded by .dockerignore, so wefax_stations.json was
never copied into the container image. The volume mounts in docker-compose
only cover subdirectories (weather_sat, adsb, etc.), leaving the stations
file inaccessible at runtime — causing the /wefax/stations route to 500
and the station/frequency dropdowns to appear empty.

Also adds a graceful file-existence check in load_stations() so a missing
file logs a warning and returns an empty list instead of an unhandled
FileNotFoundError.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@smittix smittix mentioned this pull request Apr 21, 2026
@smittix smittix merged commit dd1c6b8 into main Apr 22, 2026
5 checks passed
@smittix smittix deleted the fix/wefax-stations-missing-in-docker branch April 22, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wefax no station loaded

1 participant