Files
testapp/.drone.yml
T
2026-09-12 15:46:23 +08:00

37 lines
730 B
YAML

kind: pipeline
type: docker
name: default
steps:
- name: build-and-push
image: plugins/docker
settings:
registry: localhost:5000
repo: localhost:5000/testapp
tags: latest
dockerfile: Dockerfile
insecure: true
- name: deploy
image: docker:cli
volumes:
- name: docker-sock
path: /var/run/docker.sock
commands:
- docker rm -f testapp 2>/dev/null || true
- docker run -d --name testapp --restart=always --network proxy
-e VIRTUAL_HOST=test.unicornlp.cn
-e VIRTUAL_PORT=80
localhost:5000/testapp:latest
trigger:
branch:
- main
event:
- push
volumes:
- name: docker-sock
host:
path: /var/run/docker.sock