An open-source tool for converting radar images to map tiles.
Based on your request, you want to modify the execution frequency of the automatic image download from every 15 minutes to a different interval. The modification needs to be done in the Dockerfile section that sets up the cron job. Here is the explanation and the suggested change.
The part of your Dockerfile that controls the 15-minute interval is this line:
RUN echo "*/15 * * * * cd /app && ./main.sh >> /app/logs/cron.log 2>&1" | crontab -The string "_/15 _ * * *" is the cron expression which currently means "execute the command at every 15th minute (0, 15, 30, 45) of every hour, every day."
If you want the job to run every 5 minutes, you would change _/15 to _/5.
Here is the Dockerfile with the automatic download frequency changed to run every 5 minutes (you can replace _/5 with any interval you prefer, e.g., _/10 for every 10 minutes).
RUN sed -i 's/\r$//' main.sh && chmod +x main.sh
RUN sed -i 's/\r$//' clear_radar.sh && chmod +x clear_radar.sh
RUN mkdir -p /app/radar /app/out /app/logs
RUN echo "*/5 * * * * cd /app && ./main.sh >> /app/logs/cron.log 2>&1" | crontab - # <-- MODIFIED HERE
RUN echo "0 0 * * * cd /app && ./clear_radar.sh >> /app/logs/cron.log 2>&1" | crontab -l | { cat; } | crontab -
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]After modifying the Dockerfile, you must rebuild and restart the Docker container for the changes to take effect:
- build image
docker compose build - Restart the service
docker compose up -d
This file is fine and does not need modification to change the cron schedule.
services:
radar-service:
build: .
container_name: openth-radar
ports:
- "8000:8000"
volumes:
- ./radar:/app/radar
- ./geotif:/app/geotif
- ./logs:/app/logs
- ./out:/app/out
environment:
- PYTHONPATH=/app
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s- radar: Stores map tiles, grouped by time.
- logs: Stores the log files for the scheduled job (cron.log).
- geotif: (Mounted, presumably for source data).
- out: (Mounted, presumably for output files).
Provides a simple API to serve radar images as map tiles, making it easy to integrate with mapping libraries like Maplibre or OpenLayers and Thailand map providers such as Longdo Map, sphere Map.
{
"version": "1.0",
"generated": 1758806914,
"host": "http://localhost:8000",
"radar": {
"past": [
{
"time": 1758801000,
"path": "/radar/1758801000"
}
]
}
}<BASE_URL>/radar/<PATH>/{z}/{x}/{y}.png
Added a heatmap feature to enhance the visual representation of radar data. The heatmap makes patterns and intensity levels more apparent, resulting in a more attractive and informative display.
Implemented a forecasting feature that predicts future radar images based on historical data. This allows users to visualize potential weather developments and plan accordingly.
This project is licensed under the MIT License.



