diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..96f201d --- /dev/null +++ b/.drone.yml @@ -0,0 +1,23 @@ +kind: pipeline +type: docker +name: default + +steps: +- name: webpack + image: node + commands: + - npm install + - npm run publish + +- name: publish-container + image: plugins/docker + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + dockerfile: Dockerfile + purge: true + pull_impage: true + repo: arminfriedl/snip + tags: latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..59fb10a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.8-alpine + +RUN apk update && apk add su-exec \ + && pip3 install pipenv + +COPY . /app +WORKDIR /app + +ENV FLASK_APP=snip +ENV FLASK_ENV=production + +RUN pipenv install + +EXPOSE 5000 +CMD ["pipenv", "run", "flask", "run", "--host=0.0.0.0"]