From f08157266f6072452181830eff953da962b730d9 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Thu, 9 Apr 2020 10:27:42 +0200 Subject: [PATCH] Automate the build --- .drone.yml | 13 +++++++++++++ Dockerfile | 15 +++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..bd47c98 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,13 @@ +kind: pipeline +name: default + +steps: + - name: docker + image: plugins/docker + settings: + repo: xefir/pynyaata + auto_tag: true + username: + from_secret: docker_username + password: + from_secret: docker_password diff --git a/Dockerfile b/Dockerfile index 8d8a243..a12f981 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ -FROM debian +FROM python ENV DEBIAN_FRONTEND noninteractive ENV LANG C.UTF-8 - -RUN apt-get update && apt-get -y upgrade && \ - apt-get -y install python3 python3-pip locales \ - python3-flask python3-flask-sqlalchemy python3-flask-httpauth python3-flaskext.wtf \ - python3-pymysql python3-requests python3-requests-toolbelt python3-bs4 python3-dotenv && \ - pip3 install cloudscraper && \ +COPY . /app +WORKDIR /app +RUN apt-get update && apt-get -y upgrade && apt-get -y install locales && \ printf "en_US.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\n" > /etc/locale.gen && \ - locale-gen && rm -rf /var/lib/apt/lists/* + locale-gen && rm -rf /var/lib/apt/lists/* && \ + pip install -r requirements.txt +CMD ["python", "app.py"]