forked from pywebio/PyWebIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
35 lines (32 loc) · 1012 Bytes
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
kind: pipeline
type: exec
name: default
clone:
disable: true
trigger:
branch:
- dev
event:
- push
steps:
- name: clone
commands:
- sleep 300 # wait aliyun repo to sync
- git init
- git remote add aliyun "https://code.aliyun.com/wang0618/pywebio.git"
- git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 aliyun $DRONE_BRANCH
- git checkout --progress --force -B $DRONE_BRANCH aliyun/$DRONE_BRANCH
- git log -1
- name: deploy demos
commands:
- | # https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#pipe-dockerfile-through-stdin
docker build -t pywebio -f- . <<EOF
FROM python:3
WORKDIR /usr/src/app
ADD ./ .
RUN pip3 install . && pip3 install --no-cache-dir -r requirements.txt
EXPOSE 8080
CMD python3 demos/__main__.py
EOF
- docker rm -f pywebio-demos || true
- docker run --restart=always --name=pywebio-demos -d pywebio