From 7202f9d535aee61fc21c23e16fe134fa3d197367 Mon Sep 17 00:00:00 2001 From: kleph Date: Mon, 12 Apr 2021 22:57:39 +0200 Subject: [PATCH] Add dockerfile and CI to build it --- .drone.yml | 21 +++++++++++++++++++++ Dockerfile | 9 +++++++++ 2 files changed, 30 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..ce83f70 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,21 @@ +--- +kind: pipeline +name: build + +steps: +- name: build image + image: plugins/docker + settings: + repo: kleph/pytubedl + tags: + - ${DRONE_COMMIT_SHA:0:8} + - latest + username: + from_secret: dockerhub_username + password: + from_secret: dockerhub_password + when: + event: + exclude: + - pull_request + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..95796f3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM python:slim + +RUN pip install flask +COPY /pytubedl/pytubedl.py /pytubedl.py +COPY /pytubedl/templates /templates +EXPOSE 5000 + +CMD ["python", "pytubedl.py"] +