From 6713b58959fe14a00c5448c9cf4315308eb6b206 Mon Sep 17 00:00:00 2001 From: ci-admin Date: Sat, 12 Sep 2026 15:46:23 +0800 Subject: [PATCH] init testapp --- .drone.yml | 36 ++++++++++++++++++++++++++++++++++++ Dockerfile | 2 ++ index.html | 1 + 3 files changed, 39 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 index.html diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..54017f6 --- /dev/null +++ b/.drone.yml @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5ef646a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM nginx:alpine +COPY index.html /usr/share/nginx/html/index.html diff --git a/index.html b/index.html new file mode 100644 index 0000000..728d2c7 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +

Hello from Drone CI + Gitea on unicornlp.cn