refactor: move runner+watchtower to portainer-compose (management plane)
- portainer-compose.yml now owns all three management-plane services: portainer, github-runner, watchtower. All mount the docker socket; none belong to the application stack. - Watchtower carries over its existing env (DOCKER_API_VERSION, ntfy URL). portainer, runner, and watchtower itself are labeled to opt out of watchtower auto-updates. - docker-compose.yml: remove github-runner (was causing self-kill during dc up -d; exclusion workaround no longer needed) - deploy.yml: simplified back to plain dc up -d with no service filtering
This commit is contained in:
@@ -23,10 +23,7 @@ jobs:
|
|||||||
- name: Pull and apply compose
|
- name: Pull and apply compose
|
||||||
run: |
|
run: |
|
||||||
$COMPOSE pull
|
$COMPOSE pull
|
||||||
# Exclude github-runner from up -d — recreating the container that
|
$COMPOSE up -d
|
||||||
# is running this job would kill the workflow mid-step.
|
|
||||||
SERVICES=$($COMPOSE config --services | grep -v '^github-runner$' | tr '\n' ' ')
|
|
||||||
$COMPOSE up -d $SERVICES
|
|
||||||
|
|
||||||
- name: Reload Caddyfile
|
- name: Reload Caddyfile
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -595,22 +595,6 @@ services:
|
|||||||
- /config/homarr/icons:/app/public/icons
|
- /config/homarr/icons:/app/public/icons
|
||||||
- /config/homarr/data:/data
|
- /config/homarr/data:/data
|
||||||
|
|
||||||
github-runner:
|
|
||||||
container_name: github_runner
|
|
||||||
image: myoung34/github-runner:latest
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- ACCESS_TOKEN=${GITHUB_RUNNER_ACCESS_TOKEN}
|
|
||||||
- REPO_URL=https://github.com/ginnoir/homelabstack
|
|
||||||
- RUNNER_NAME=valhalla
|
|
||||||
- RUNNER_LABELS=self-hosted,Linux,x64
|
|
||||||
- RUNNER_SCOPE=repo
|
|
||||||
- DOCKER_GROUP_GID=1001
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- /home/ginnoir/valhalla-lab:/valhalla-lab
|
|
||||||
- /config/caddy:/config/caddy
|
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# UTILITIES
|
# UTILITIES
|
||||||
# ============================================================
|
# ============================================================
|
||||||
|
|||||||
+40
-9
@@ -1,14 +1,12 @@
|
|||||||
# Portainer is managed by this separate compose file so it owns the
|
# Management-plane services: portainer, github-runner, watchtower.
|
||||||
# portainer_proxy network. The main docker-compose.yml references it
|
# These manage the application stack rather than being part of it.
|
||||||
# as external: true. Bring this up BEFORE the main stack on fresh installs.
|
|
||||||
#
|
#
|
||||||
# On the server: ~/valhalla-lab/portainer-compose.yml
|
# This file also owns the portainer_proxy network that the main
|
||||||
|
# docker-compose.yml references as external: true.
|
||||||
#
|
#
|
||||||
# Migration from standalone container:
|
# Fresh-install order:
|
||||||
# docker stop portainer && docker rm portainer
|
# docker compose -f portainer-compose.yml up -d # network + mgmt plane first
|
||||||
# docker network rm portainer_proxy # remove orphaned standalone network
|
# dc up -d # application stack second
|
||||||
# docker compose -f portainer-compose.yml up -d
|
|
||||||
# dc up -d # reconnects caddy to new network
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
portainer:
|
portainer:
|
||||||
@@ -22,6 +20,39 @@ services:
|
|||||||
- /config/portainer:/data
|
- /config/portainer:/data
|
||||||
ports:
|
ports:
|
||||||
- "9100:9000"
|
- "9100:9000"
|
||||||
|
labels:
|
||||||
|
- "com.centurylabs.watchtower.enable=false"
|
||||||
|
|
||||||
|
github-runner:
|
||||||
|
container_name: github_runner
|
||||||
|
image: myoung34/github-runner:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- ACCESS_TOKEN=${GITHUB_RUNNER_ACCESS_TOKEN}
|
||||||
|
- REPO_URL=https://github.com/ginnoir/homelabstack
|
||||||
|
- RUNNER_NAME=valhalla
|
||||||
|
- RUNNER_LABELS=self-hosted,Linux,x64
|
||||||
|
- RUNNER_SCOPE=repo
|
||||||
|
- DOCKER_GROUP_GID=1001
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- /home/ginnoir/valhalla-lab:/valhalla-lab
|
||||||
|
- /config/caddy:/config/caddy
|
||||||
|
labels:
|
||||||
|
- "com.centurylabs.watchtower.enable=false"
|
||||||
|
|
||||||
|
watchtower:
|
||||||
|
container_name: watchtower
|
||||||
|
image: containrrr/watchtower:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- DOCKER_API_VERSION=1.40
|
||||||
|
- WATCHTOWER_NOTIFICATION_SKIP_TITLE=true
|
||||||
|
- WATCHTOWER_NOTIFICATION_URL=ntfy://ntfy.ginnoir.com/watchtower?title=WatchtowerUpdates
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
labels:
|
||||||
|
- "com.centurylabs.watchtower.enable=false"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
portainer_proxy:
|
portainer_proxy:
|
||||||
|
|||||||
Reference in New Issue
Block a user