2025-12-17 13:32:05 +08:00
|
|
|
kind: pipeline
|
2025-12-17 13:38:36 +08:00
|
|
|
type: docker
|
2025-12-17 13:32:05 +08:00
|
|
|
name: build-and-push-arm64
|
|
|
|
|
|
|
|
|
|
platform:
|
|
|
|
|
os: linux
|
|
|
|
|
arch: arm64
|
|
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|
- tag
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: build-and-push-to-gitea
|
|
|
|
|
image: 192.168.0.75:3000/guanyuankai/plugins-docker:latest
|
|
|
|
|
privileged: true
|
|
|
|
|
settings:
|
|
|
|
|
registry: 192.168.0.75:3000
|
|
|
|
|
username:
|
2025-12-17 13:38:36 +08:00
|
|
|
from_secret: gitea_username
|
2025-12-17 13:32:05 +08:00
|
|
|
password:
|
|
|
|
|
from_secret: gitea_password
|
2025-12-17 13:38:36 +08:00
|
|
|
repo: 192.168.0.75:3000/guanyuankai/Vehicle_Road_Counter
|
2025-12-17 13:32:05 +08:00
|
|
|
insecure: true
|
|
|
|
|
mirror: "https://docker.m.daocloud.io"
|
|
|
|
|
tags:
|
|
|
|
|
- latest
|
|
|
|
|
- "${DRONE_TAG}"
|
|
|
|
|
dockerfile: docker/Dockerfile.prod
|
|
|
|
|
context: .
|
|
|
|
|
platforms: linux/arm64
|
|
|
|
|
|
|
|
|
|
# - name: scp-config-to-edge
|
|
|
|
|
# image: appleboy/drone-scp
|
|
|
|
|
# settings:
|
2025-12-17 13:38:36 +08:00
|
|
|
# host:
|
2025-12-17 13:32:05 +08:00
|
|
|
# from_secret: edge_host_ip
|
2025-12-17 13:38:36 +08:00
|
|
|
# username:
|
2025-12-17 13:32:05 +08:00
|
|
|
# from_secret: edge_user
|
2025-12-17 13:38:36 +08:00
|
|
|
# password:
|
2025-12-17 13:32:05 +08:00
|
|
|
# from_secret: edge_password
|
|
|
|
|
# port: 22
|
|
|
|
|
# target: /opt/edge-proxy
|
2025-12-17 13:38:36 +08:00
|
|
|
# source:
|
2025-12-17 13:32:05 +08:00
|
|
|
# - docker-compose.prod.yml
|
|
|
|
|
# - mediamtx.yml
|
|
|
|
|
# - mosquitto/config/mosquitto.conf
|
|
|
|
|
|
|
|
|
|
# - name: deploy-to-edge
|
|
|
|
|
# image: appleboy/drone-ssh
|
|
|
|
|
# settings:
|
2025-12-17 13:38:36 +08:00
|
|
|
# host:
|
2025-12-17 13:32:05 +08:00
|
|
|
# from_secret: edge_host_ip
|
2025-12-17 13:38:36 +08:00
|
|
|
# username:
|
2025-12-17 13:32:05 +08:00
|
|
|
# from_secret: edge_user
|
2025-12-17 13:38:36 +08:00
|
|
|
# password:
|
2025-12-17 13:32:05 +08:00
|
|
|
# from_secret: edge_password
|
|
|
|
|
# port: 22
|
2025-12-17 13:38:36 +08:00
|
|
|
|
2025-12-17 13:32:05 +08:00
|
|
|
# ignore_stderr: true
|
|
|
|
|
# script:
|
2025-12-17 13:38:36 +08:00
|
|
|
|
2025-12-17 13:32:05 +08:00
|
|
|
# - mkdir -p /opt/edge-proxy
|
|
|
|
|
# - cd /opt/edge-proxy
|
|
|
|
|
# - echo "$REGISTRY_PASSWORD" | docker login 192.168.0.75:3000 -u "$REGISTRY_USER" --password-stdin
|
2025-12-17 13:38:36 +08:00
|
|
|
|
2025-12-17 13:32:05 +08:00
|
|
|
# - docker compose -f docker-compose.prod.yml pull
|
2025-12-17 13:38:36 +08:00
|
|
|
|
2025-12-17 13:32:05 +08:00
|
|
|
# - docker compose -f docker-compose.prod.yml up -d --remove-orphans
|
2025-12-17 13:38:36 +08:00
|
|
|
|
2025-12-17 13:32:05 +08:00
|
|
|
# - docker image prune -f
|
|
|
|
|
# environment:
|
|
|
|
|
# REGISTRY_USER:
|
|
|
|
|
# from_secret: gitea_username
|
|
|
|
|
# REGISTRY_PASSWORD:
|
2025-12-17 13:38:36 +08:00
|
|
|
# from_secret: gitea_password
|