init testapp

This commit is contained in:
ci-admin
2026-09-12 15:46:23 +08:00
commit 6713b58959
3 changed files with 39 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
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
+2
View File
@@ -0,0 +1,2 @@
FROM nginx:alpine
COPY index.html /usr/share/nginx/html/index.html
+1
View File
@@ -0,0 +1 @@
<h1>Hello from Drone CI + Gitea on unicornlp.cn</h1>