feature/todo #9
32
.drone.yml
32
.drone.yml
|
@ -134,7 +134,7 @@ steps:
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: main-merge-pull-request-prod
|
name: main-tag-prod
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
|
@ -146,16 +146,32 @@ trigger:
|
||||||
- main
|
- main
|
||||||
event:
|
event:
|
||||||
include:
|
include:
|
||||||
- push
|
- tag
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
disable: true
|
disable: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: semantic-release
|
- name: clone-repo
|
||||||
image: lework/semantic-release
|
image: alpine/git
|
||||||
|
commands:
|
||||||
|
- git clone ${DRONE_GIT_HTTP_URL} .
|
||||||
|
- git checkout ${DRONE_BRANCH}
|
||||||
|
- name: build-and-push-image
|
||||||
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
git_login:
|
registry:
|
||||||
from_secret: gitea_user
|
from_secret: Œ
|
||||||
git_password:
|
username:
|
||||||
from_secret: gitea_password
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: gitea.bearcatlog.com/bryant/todo
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
tags:
|
||||||
|
- ${DRONE_TAG}
|
||||||
|
# auto_tag: true
|
||||||
|
purge: true
|
||||||
|
compress: true
|
||||||
|
# TODO 通知 k8s 更新镜像
|
|
@ -1,5 +1,7 @@
|
||||||
FROM python:3.11
|
FROM python:3.11
|
||||||
|
|
||||||
#WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# CMD ["python3", "test.py"]
|
RUN python3 -m pip install -i https://mirrors.cloud.tencent.com/pypi/simple --trusted-host=mirrors.cloud.tencent.com -r requirements.txt
|
||||||
|
|
||||||
|
CMD ["python3", "app.py"]
|
|
@ -0,0 +1,4 @@
|
||||||
|
from apiflask import APIFlask
|
||||||
|
|
||||||
|
app = APIFlask(__name__)
|
||||||
|
app.run()
|
|
@ -12,10 +12,10 @@ services:
|
||||||
environment:
|
environment:
|
||||||
TZ: "Asia/Shanghai"
|
TZ: "Asia/Shanghai"
|
||||||
tty: true
|
tty: true
|
||||||
working_dir: /app
|
|
||||||
command: ["python3", "test.py"]
|
|
||||||
networks:
|
networks:
|
||||||
- todo-service
|
- todo-service
|
||||||
|
ports:
|
||||||
|
- "5010:5000"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
todo-service:
|
todo-service:
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
apiflask>=1.3.1
|
Loading…
Reference in New Issue