Add drone build

This commit is contained in:
Armin Friedl 2020-09-12 21:31:45 +02:00
parent 1ba8fc71a8
commit 9f755c7e16
Signed by: armin
GPG key ID: 48C726EEE7FBCBC8
3 changed files with 42 additions and 0 deletions

22
.drone.yml Normal file
View file

@ -0,0 +1,22 @@
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
repo: arminfriedl/netclock
tags: latest

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
FROM python:alpine
RUN apk update && apk add redis su-exec \
&& pip3 install pipenv
COPY . /app
WORKDIR /app
ENV FLASK_APP=netclock.py
ENV FLASK_ENV=production
RUN pipenv install
EXPOSE 5000
ENTRYPOINT ["./entrypoint.sh"]

5
entrypoint.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
redis-server &
pipenv run flask run