Initialize Spring Boot docker branch with Drone pipeline

This commit is contained in:
2026-06-19 23:46:24 +08:00
commit c57406b4ac
10 changed files with 154 additions and 0 deletions

32
.drone.yml Normal file
View File

@@ -0,0 +1,32 @@
kind: pipeline
type: docker
name: backend-docker
trigger:
branch:
- docker
event:
- push
steps:
- name: build-image
image: docker:27-cli
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker build -t cdchen-backend:docker .
- name: deploy
image: docker:27-cli
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker rm -f cdchen-backend || true
- docker run -d --name cdchen-backend --restart unless-stopped -p 8089:8080 cdchen-backend:docker
volumes:
- name: dockersock
host:
path: /var/run/docker.sock