Add CI/CD

This commit is contained in:
Dryusdan 2023-02-02 17:21:34 +01:00
parent dab686f159
commit 355070bdfb
2 changed files with 32 additions and 0 deletions

20
.drone.yml Normal file
View File

@ -0,0 +1,20 @@
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
repo: git.dryusdan.fr/dryusdan/paris-brest-paris-prometheus-exporter
tags: latest
no_cache: true
dry_run: false
force_tag: true
registry: git.dryusdan.fr
username:
from_secret: gitea_login
password:
from_secret: gitea_docker_secret
when:
branch: main
event: push

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM python:3.10-alpine
COPY ./ /app
WORKDIR /app
RUN apk add -U --no-cache --virtual builds gcc musl-dev libffi-dev \
&& pip3 install poetry \
&& poetry install --only main \
&& apk del builds
CMD poetry run python3 app/main.py