Compare commits

...

20 Commits

Author SHA1 Message Date
Gabriele De Rosa cdc0f990b4
Merge pull request #5 from derogab/dev
Use Alpine as docker base image
2021-11-26 16:03:40 +01:00
Gabriele De Rosa 39fc0be135 Add wkhtmltopdf requirements on Alpine
- Install ttf-liberation 
- Install qt5-qtwebkit
2021-11-26 15:04:17 +01:00
Gabriele De Rosa f4caa7a924 Move some packages to tmp packages 2021-11-26 12:54:06 +01:00
Gabriele De Rosa 6cbbd6d1b3 Fix Dockerfile 2021-11-26 12:45:25 +01:00
Gabriele De Rosa 35de8e84c6 Add PIP extra index URLs 2021-11-26 12:44:25 +01:00
Gabriele De Rosa b1ba5cf3f2 Use alpine 3.14 as docker base image 2021-11-26 12:20:13 +01:00
Gabriele De Rosa 6352e9df70 Add --no-cache flag 2021-11-26 12:16:43 +01:00
Gabriele De Rosa 487d77e90e Use ALPINE version of Python as docker base image 2021-11-26 12:11:50 +01:00
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
Gabriele De Rosa 22da4ff0ea Remove linux/arm/v6 architecture in docker images 2021-10-31 02:54:05 +01:00
Gabriele De Rosa 857d89d26a Add tzdata 2021-10-31 02:48:30 +01:00
Gabriele De Rosa 33326e3a5b Install PIP 2021-10-31 02:40:06 +01:00
Gabriele De Rosa c08169e987 Use alpine:latest 2021-10-31 02:37:45 +01:00
Gabriele De Rosa 2cdaf9199e Add cmake 2021-10-31 02:38:23 +02:00
Gabriele De Rosa f8c09f7eb7 Fix 2021-10-26 17:41:46 +02:00
Gabriele De Rosa b73cde8cd5 Add some requirements with APK 2021-10-26 15:04:38 +02:00
Gabriele De Rosa b468bf8572 Use alpine python base 2021-10-26 14:22:26 +02:00
Gabriele De Rosa a336ea0ffa Use slim python base 2021-10-26 14:16:43 +02:00
4 changed files with 47 additions and 24 deletions

View File

@ -98,7 +98,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
@ -155,7 +155,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,26 +1,38 @@
FROM python:3
FROM alpine:3.14
# Set working space
WORKDIR /usr/src/app
# Install dependencies
RUN apt-get update \
# Prevent endless waiting
&& DEBIAN_FRONTEND=noninteractive \
RUN apk update --no-cache \
# Install packages
&& apk add --no-cache \
tzdata \
python3 py3-pip py3-numpy py3-pandas py3-matplotlib \
ttf-liberation qt5-qtwebkit wkhtmltopdf \
# Set UTC as timezone
&& ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \
# Install APT packages
&& apt-get install -y --fix-missing wkhtmltopdf \
# Remove tmp files
&& apt-get clean && rm -rf /tmp/* /var/tmp/* \
# Add PiWheels support
&& echo "[global]\nextra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf \
&& rm -rf /tmp/* /var/tmp/* \
# Upgrade PIP
&& python3 -m pip install --no-cache-dir --upgrade pip
# Copy and install requirements
# Copy PIP extra index URLs
COPY pip.conf .
# Copy requirements
COPY requirements.txt .
RUN python3 -m pip install -r requirements.txt
# Install requirements
RUN apk update --no-cache \
# Install tmp packages
&& apk add --no-cache --virtual build-deps gcc python3-dev musl-dev build-base freetype-dev libpng-dev openblas-dev \
# Add PIP extra index URLs
&& mv pip.conf /etc/pip.conf \
# Install PIP packages
&& python3 -m pip install --no-cache-dir -r requirements.txt \
# Delete tmp packages
&& apk del build-deps
# Copy app
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">
<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
## Configurazione
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).
```
docker-compose up --build
```
### Crediti
## Crediti
Il bot è stato sviluppato da [@derogab](https://github.com/derogab) e il codice sorgente è pubblicamente disponibile su Github.

5
pip.conf Normal file
View File

@ -0,0 +1,5 @@
[global]
index-url = https://alpine-wheels.github.io/index
extra-index-url = https://pypi.python.org/simple
https://pypi.org/simple
https://www.piwheels.org/simple