Add drone build
This commit is contained in:
parent
1ba8fc71a8
commit
9f755c7e16
3 changed files with 42 additions and 0 deletions
22
.drone.yml
Normal file
22
.drone.yml
Normal 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
15
Dockerfile
Normal 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
5
entrypoint.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
redis-server &
|
||||||
|
|
||||||
|
pipenv run flask run
|
Loading…
Reference in a new issue