After pushing the image, SSH-deploy pulls and restarts the homelab tracker compose service behind Traefik. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d98bb06b6f
commit
9facc035f9
1 file changed
+66
-1
+66
-1
@@ -6,7 +6,6 @@ platform:
|
|||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
# Pi-hole on LAN so *.zea.lt hits Traefik (not public hairpin)
|
|
||||||
dns:
|
dns:
|
||||||
- 192.168.0.64
|
- 192.168.0.64
|
||||||
|
|
||||||
@@ -76,3 +75,69 @@ steps:
|
|||||||
- master
|
- master
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
- custom
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: deploy
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
dns:
|
||||||
|
- 192.168.0.64
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- build-and-push
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
limit: 1
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: ssh-deploy
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
pull: false
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: ssh_host
|
||||||
|
username:
|
||||||
|
from_secret: ssh_user
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
port:
|
||||||
|
from_secret: ssh_port
|
||||||
|
script_stop: true
|
||||||
|
envs:
|
||||||
|
- REGISTRY_USERNAME
|
||||||
|
- REGISTRY_PASSWORD
|
||||||
|
script:
|
||||||
|
- set -euo pipefail
|
||||||
|
- echo "${REGISTRY_PASSWORD}" | docker login registry.zea.lt -u "${REGISTRY_USERNAME}" --password-stdin
|
||||||
|
- cd /home/miczek/homelab/tracker
|
||||||
|
- docker compose pull
|
||||||
|
- docker compose up -d --remove-orphans
|
||||||
|
- docker compose ps
|
||||||
|
- docker logout registry.zea.lt || true
|
||||||
|
environment:
|
||||||
|
REGISTRY_USERNAME:
|
||||||
|
from_secret: registry_username
|
||||||
|
REGISTRY_PASSWORD:
|
||||||
|
from_secret: registry_password
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- custom
|
||||||
Reference in new issue
Block a user