init testapp
This commit is contained in:
+36
@@ -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
|
||||
@@ -0,0 +1,2 @@
|
||||
FROM nginx:alpine
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
@@ -0,0 +1 @@
|
||||
<h1>Hello from Drone CI + Gitea on unicornlp.cn</h1>
|
||||
Reference in New Issue
Block a user