2023-09-22 08:21:01 +03:00
|
|
|
<h1>Säätiedot! Weather!</h1>
|
2023-10-18 12:19:20 +03:00
|
|
|
|
2023-10-18 09:57:24 +03:00
|
|
|
Perustuu wttrin sääpalveluun: https://github.com/chubin/wttr.in
|
2023-09-20 23:28:10 +03:00
|
|
|
|
2023-10-18 09:57:24 +03:00
|
|
|
Kloonaa kansio:
|
2023-10-18 12:14:28 +03:00
|
|
|
<code>git clone http://88.114.1.82:3000/RikuSi/docker_weather.git</code>
|
2023-09-21 00:41:38 +03:00
|
|
|
|
2023-10-18 09:57:24 +03:00
|
|
|
Mene kansioon:
|
2023-10-18 12:14:28 +03:00
|
|
|
<code>cd docker_weather</code>
|
2023-09-20 23:28:10 +03:00
|
|
|
|
2023-10-18 09:57:24 +03:00
|
|
|
Pura kansio:
|
2023-10-18 12:14:28 +03:00
|
|
|
<code>unzip weather-image.tar.zip</code>
|
2023-09-20 23:28:10 +03:00
|
|
|
|
2023-10-18 09:57:24 +03:00
|
|
|
Lataa kontti Dockeriin:
|
2023-10-18 12:14:28 +03:00
|
|
|
<code>sudo docker load -i weather-image.tar</code>
|
2023-09-20 23:28:10 +03:00
|
|
|
|
2023-11-18 03:22:19 +02:00
|
|
|
<br><br>
|
2023-11-18 03:20:20 +02:00
|
|
|
|
2023-10-24 09:09:44 +03:00
|
|
|
Anna koordinaatit muodossa: desimaaliasteet (DD): 41.40338, 2.17403
|
|
|
|
|
2023-10-18 12:19:20 +03:00
|
|
|
Aika tiedot (TZ) löytyy täältä: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
2023-09-22 08:27:57 +03:00
|
|
|
|
2023-10-18 12:14:28 +03:00
|
|
|
Käynnistä kontti:
|
|
|
|
<code>sudo docker run -d --name weather -e LATITUDE="61.4981" -e LONGITUDE="23.7608" -e MAX_RESULTS="10" -e TZ="Europe/Helsinki" -p 8600:80 weather-image</code>
|
2023-09-20 23:28:10 +03:00
|
|
|
|
2023-11-18 03:22:19 +02:00
|
|
|
<br><br>
|
2023-11-18 03:20:20 +02:00
|
|
|
|
2023-10-18 12:14:28 +03:00
|
|
|
Käynnistä kontti tietokoneen käynnistyessä:
|
|
|
|
<code>sudo docker update --restart unless-stopped weather</code>
|
2023-09-20 23:28:10 +03:00
|
|
|
|
2023-10-18 09:57:24 +03:00
|
|
|
http://localhost:8600
|
2023-09-20 23:28:10 +03:00
|
|
|
|
2023-10-18 09:57:24 +03:00
|
|
|
Scripti joka hakee tiedot päivittyy 10 min välein.
|
|
|
|
Selain päivittyy 5 min välein
|