LOWeather is a small app that will combine weather conditions from a specific location with current wave conditions on Lake of the Woods.
- The current weather location is Wheeler's Point which is where the Rainy River meets the Lake of the Woods.
- The current wave conditions come from a Wave Buoy located in the middle of Big Traverse Bay on Lake of the Woods.
app.py- Flask web app that serves a single page (/)weather.py- Gets current weather and past 5 days of precipitation from the Open-Meteo API (no API key needed)buoy.py- Gets the latest wave height and direction from the Obscape buoy portal (uses the API key in the file)templates/index.htmlandstatic/- The page layout, styling and iconopen-mateo.py- Old standalone test script, not used by the app
- Python packages:
flaskandgunicorn(listed inrequirements.txt). Everything else uses the Python standard library. - The server needs outbound internet access to
api.open-meteo.comandobscape.com. - The app runs on port 8090.
These steps work on any Linux server. Other operating systems work too if Docker is installed.
Follow the official instructions for your OS: https://docs.docker.com/engine/install/
Check that it's installed:
docker --version
docker compose version(Optional) Let your user run Docker without sudo, then log out and back in:
sudo usermod -aG docker $USERgit clone https://github.com/kennyehh/LOWeather.git
cd LOWeatherdocker compose up -d --build--buildbuilds the image from theDockerfile-druns it in the backgroundrestart: unless-stoppedindocker-compose.ymlmakes it start again automatically after a reboot or crash
docker compose ps
docker compose logs -fThen open a browser to:
http://<server-ip>:8090
If the page doesn't load from another device, make sure port 8090 is open in the server's firewall. For example:
# Fedora / RHEL (firewalld)
sudo firewall-cmd --permanent --add-port=8090/tcp
sudo firewall-cmd --reload
# Ubuntu / Debian (ufw)
sudo ufw allow 8090/tcpcd LOWeather
git pull
docker compose up -d --builddocker compose downTo use a different port on the host, change only the left side of the port mapping in docker-compose.yml. For example, to serve on port 80:
ports:
- "80:8090"Then run docker compose up -d again.
Requires Python 3.
git clone https://github.com/kennyehh/LOWeather.git
cd LOWeather
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtRun with the Flask development server (port 5000):
python app.pyOr run with gunicorn, the same way the Docker container does (port 8090, Linux/macOS only):
gunicorn --bind 0.0.0.0:8090 --workers 3 --timeout 60 app:app