Compare commits

...

3 Commits

Author SHA1 Message Date
Gabriele De Rosa 30f1023f6c Fix requirements
Install gfortran
2021-11-26 02:11:50 +01:00
Gabriele De Rosa f43e4c38da Use SLIM version of Python as docker base image 2021-11-26 01:54:34 +01:00
Gabriele De Rosa ffc7c78315
Update README.md 2021-11-26 01:40:08 +01:00
2 changed files with 26 additions and 30 deletions

View File

@ -1,36 +1,26 @@
FROM alpine:latest FROM python:3-slim
# Set working space # Set working space
WORKDIR /usr/src/app WORKDIR /usr/src/app
# Install dependencies # Install dependencies
RUN apk update \ RUN apt-get update \
# Install packages # Prevent endless waiting
&& apk add \ && DEBIAN_FRONTEND=noninteractive \
tzdata \
build-base freetype-dev libpng-dev openblas-dev \
python3 py3-pip py3-numpy py3-pandas py3-matplotlib \
wkhtmltopdf \
# Set UTC as timezone # Set UTC as timezone
&& ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \ && ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \
# Install APT packages
&& apt-get install -y --fix-missing wkhtmltopdf gfortran \
# Remove tmp files # Remove tmp files
&& rm -rf /tmp/* /var/tmp/* \ && apt-get clean && rm -rf /tmp/* /var/tmp/* \
# Add PiWheels support # Add PiWheels support
&& echo "[global]\nextra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf \ && echo "[global]\nextra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf \
# Upgrade PIP # Upgrade PIP
&& python3 -m pip install --no-cache-dir --upgrade pip && python3 -m pip install --no-cache-dir --upgrade pip
# Copy requirements # Copy and install requirements
COPY requirements.txt . COPY requirements.txt .
RUN python3 -m pip install -r requirements.txt
# Install requirements
RUN apk update \
# Install tmp packages
&& apk add --virtual build-deps gcc python3-dev musl-dev \
# Install PIP packages
&& python3 -m pip install --no-cache-dir -r requirements.txt \
# Delete tmp packages
&& apk del build-deps
# Copy app # Copy app
COPY . . COPY . .

View File

@ -1,23 +1,29 @@
<h1 align="center">:it: ITA vs. COVID :microbe:</h1>
<p align="center">
<img src="./assets/images/logo.png" alt="header" width="150px">
</p>
<h3 align="center">Un bot telegram che ti aggiorna sulla battaglia contro il Covid in Italia</h3>
<p align="center">
<a href="https://hub.docker.com/r/derogab/itavscovidbot">
<img src="https://img.shields.io/docker/pulls/derogab/itavscovidbot?label=Downloads&logo=docker" alt="Docker Pulls">
</a>
<a href="https://github.com/derogab/itavscovidbot/actions/workflows/docker-publish.yml">
<img src="https://github.com/derogab/itavscovidbot/actions/workflows/docker-publish.yml/badge.svg" alt="Build & Push Docker Image">
</a>
</p>
<div align="center"> ## Configurazione
<img src="./assets/images/logo.png" width="150">
</div>
<div align="center">
<h1 align="center">🇮🇹 ITA vs. COVID 🦠</h1>
Un bot telegram che ti aggiorna sulla battaglia contro il Covid in Italia.
</div>
### Configurazione
Copia tutti i file `.env.sample` nei relativi `.env` con le preferenze personali. Copia tutti i file `.env.sample` nei relativi `.env` con le preferenze personali.
### Avvio ## Avvio
Il bot utilizza [docker](https://www.docker.com/) e [docker-compose](https://docs.docker.com/compose). Il bot utilizza [docker](https://www.docker.com/) e [docker-compose](https://docs.docker.com/compose).
``` ```
docker-compose up --build docker-compose up --build
``` ```
### Crediti ## Crediti
Il bot è stato sviluppato da [@derogab](https://github.com/derogab) e il codice sorgente è pubblicamente disponibile su Github. Il bot è stato sviluppato da [@derogab](https://github.com/derogab) e il codice sorgente è pubblicamente disponibile su Github.