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"]