From 374d90b8e3757100d93bf5105f797cc3e4292c2a Mon Sep 17 00:00:00 2001
From: Gabriele De Rosa
Date: Fri, 21 May 2021 03:28:16 +0200
Subject: [PATCH 1/6] Minor improvements
---
bot.py | 2 +-
docker-compose.yml | 12 ++++--------
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/bot.py b/bot.py
index 1bfb18a..649e091 100644
--- a/bot.py
+++ b/bot.py
@@ -52,7 +52,7 @@ mongodb_pass = os.environ.get('MONGODB_PASS')
if mongodb_user is None or mongodb_pass is None:
print('No mongodb auth.')
exit()
-mongodb_uri = 'mongodb://' + mongodb_user + ':' + mongodb_pass + '@db:27017',
+mongodb_uri = 'mongodb://' + mongodb_user + ':' + mongodb_pass + '@db:27017'
# Init mongodb database
client = MongoClient(mongodb_uri)
diff --git a/docker-compose.yml b/docker-compose.yml
index 09acf9e..801e25d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,14 +1,15 @@
-version: "3.5"
+version: '3.7'
networks:
itavscovidbot.network:
name: itavscovidbot.network
+ driver: bridge
services:
db:
- image: mongo
+ image: mongo:latest
container_name: itavscovidbot.db
restart: unless-stopped
env_file:
@@ -21,11 +22,9 @@ services:
db.web:
depends_on:
- db
- image: mongo-express
+ image: mongo-express:latest
container_name: itavscovidbot.db.web
restart: unless-stopped
- links:
- - db
env_file:
- ./db/web/.env
ports:
@@ -36,13 +35,10 @@ services:
app:
depends_on:
- db
- - db.web
build:
context: .
container_name: itavscovidbot.app
restart: unless-stopped
- links:
- - db
env_file:
- ./.env
networks:
From ee5df0c4c7269de2fa6467723f7302c3faf504f1 Mon Sep 17 00:00:00 2001
From: Gabriele De Rosa
Date: Fri, 21 May 2021 14:15:34 +0200
Subject: [PATCH 2/6] Restyle
---
template.html => assets/templates/intro.html | 30 +--
assets/templates/plot.html | 87 +++++++++
bot.py | 189 ++++++++++++-------
3 files changed, 213 insertions(+), 93 deletions(-)
rename template.html => assets/templates/intro.html (66%)
create mode 100644 assets/templates/plot.html
diff --git a/template.html b/assets/templates/intro.html
similarity index 66%
rename from template.html
rename to assets/templates/intro.html
index 813d78f..7aed320 100644
--- a/template.html
+++ b/assets/templates/intro.html
@@ -41,33 +41,11 @@
Analisi dei dati della campagna vaccinale
- La campagna vaccinale in Italia è iniziata da poco e chiaramente non è ancora a regime. La stima qui effettuata
- sarà via via più affidabile con l'aumentare dei dati e indica il tempo che mancherebbe al raggiungimento
+ La stima qui effettuata indica il tempo che mancherebbe al raggiungimento
dell'immunità di gregge qualora si tenesse il ritmo degli ultimi 7 giorni.
- In Italia sono state somministrate
-
-
- dosi di vaccino
- che corrispondono a
-
-
- persone vaccinate,
- ovvero
-
-
- della popolazione.
-
- Ne abbiamo vaccinate
-
-
- nell'ultima settimana,
- con un ritmo di
-
-
- vaccinati al giorno.
Continuando di questo passo, raggiungeremo l'immunità di gregge il
@@ -81,13 +59,13 @@
giorni.
-
+
I dati non comprendono quelli del giorno attuale perché solitamente incompleti.
- Dal 2 febbraio 2021 il grafico mostra i dati delle persone vaccinate,
- ovvero di chi ha ricevuto entrambe le dosi.
+ Dal 21 maggio 2021 vengono mostrati due differenti grafici per differenziare
+ le prime e le seconde dosi.
+
+
+
+
+
+
+
+
+ Somministrazioni
+
+
+
+
+
+
+
+
+
+
+ Questa settimana
+
+
+
+
+
+
+
+ Media settimanale
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/templates/plot.html b/assets/templates/plot.html
new file mode 100644
index 0000000..c6a4e76
--- /dev/null
+++ b/assets/templates/plot.html
@@ -0,0 +1,87 @@
+
+
+
+