Some checks failed
Sync infra to hosts / sync-beta (push) Has been skipped
Sync infra to hosts / sync-prod (push) Has been skipped
Sync infra to hosts / sync-dev (push) Failing after 6s
secrets-guard / encrypted (push) Successful in 6s
shell-lint / shellcheck (push) Successful in 13s
Validate observability stack / validate (push) Successful in 17s
PR build (required check) / changes (pull_request) Successful in 6s
secrets-guard / encrypted (pull_request) Successful in 5s
PR build (required check) / build-backend (pull_request) Has been skipped
shell-lint / shellcheck (pull_request) Successful in 6s
PR build (required check) / build-frontend (pull_request) Has been skipped
PR build (required check) / validate-observability (pull_request) Successful in 18s
PR build (required check) / gate (pull_request) Successful in 2s
13 lines
511 B
Bash
Executable file
13 lines
511 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Run ONCE, on the manager node (vps2), after both boxes have joined the
|
|
# swarm. Labels the worker (vps1) so the Forgejo stack's placement constraint
|
|
# (node.labels.role == forge) schedules there and nowhere else.
|
|
set -euo pipefail
|
|
|
|
WORKER_HOSTNAME="${1:?usage: $0 <worker_node_hostname_or_id> (see: docker node ls)}"
|
|
|
|
docker node update --label-add role=forge "$WORKER_HOSTNAME"
|
|
|
|
echo
|
|
echo "Labels on ${WORKER_HOSTNAME}:"
|
|
docker node inspect "$WORKER_HOSTNAME" --format '{{.Spec.Labels}}'
|