Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,16 +348,14 @@ Each app in a target's `apps` mapping lists its own `env_refs` — release refs

## Notable App Configurations

- **traefik**: Entry point, uses external network. Note: currently carries the Watchtower label (see below) - a target that doesn't also run a `watchtower` container (hawkeye doesn't, as of this writing) would never get `docker compose up` run for it by the automated path. Known gap, not yet resolved.
- **watchtower**: Infrastructure app — recommended on every server. Handles automatic image updates for apps that opt in via the `com.centurylinklabs.watchtower.enable=true` label. `deploy/deploy.py` skips running `docker compose pull`/`up` for any app with this label entirely, so Watchtower is their sole lifecycle manager.
- **traefik**: Entry point, uses external network.
- Apps with databases include a versioned template (e.g. `postgres-18.yml`) and create app-specific database named `${APP_NAME}`
- Config templates use `envsubst`-equivalent substitution (`deploy/render.py`) - variables must be shell-compatible (`${VAR}` syntax)

## Watchtower-managed Apps

Apps that carry the `com.centurylinklabs.watchtower.enable=true` label are updated automatically by Watchtower and are **skipped by `deploy/deploy.py`** - their `.env`/config still gets pushed on every deploy, but `docker compose pull`/`up` is never run for them. The label in the compose file is the single source of truth — no separate skip list exists.

Currently opted in: `traefik`, `semaphore`, `watchtower` itself.
Watchtower was dropped entirely (there is no `apps/watchtower/`, and no app
carries its label) — `deploy/deploy.py` already runs `docker compose pull &&
up -d` for every app in a target's `apps` mapping on every deploy, which
made Watchtower's own polling redundant. See `RETIRED.md`.

## Important: Template Files vs Generated Files

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ chmod 600 apps-data/traefik/acme.json

1. **Change Default Credentials** - Update vault-sourced secrets and re-deploy
2. **Use Strong Passwords** - Generate with: `openssl rand -base64 32`
3. **Keep Images Updated** - Watchtower-managed apps update automatically; others get the latest image on every deploy (`docker compose pull` runs before `up`)
3. **Keep Images Updated** - every deploy runs `docker compose pull` before `up`, so all apps get their latest image on every deploy
4. **Restrict Network Access** - Use firewall rules to limit access to Traefik ports (80, 443)
5. **Enable HTTPS** - Always use HTTPS, never expose HTTP to internet
6. **Backup Data** - Regularly back up `apps-data/` (backup automation is a separate, not-yet-decided piece of tooling)
Expand All@@ -217,6 +217,7 @@ chmod 600 apps-data/traefik/acme.json
## 📚 Additional Resources

- [AGENTS.md](AGENTS.md) - Technical documentation for AI agents and developers
- [RETIRED.md](RETIRED.md) - Apps removed from the active stack, and why
- [Docker Documentation](https://docs.docker.com/)
- [Docker Compose Documentation](https://docs.docker.com/compose/)
- [Traefik Documentation](https://doc.traefik.io/)
Expand Down
10 changes: 10 additions & 0 deletions RETIRED.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
# Retired Apps

Apps removed from the active stack. Technical details are recoverable from git history. Each entry captures only the human context: why the app was dropped.

---

## watchtower

- **Retired:** 2026-08-21
- **Reason:** Redundant once the deploy pipeline itself became idempotent — every deploy already runs `docker compose pull && up -d` for every app, which re-pulls and reconciles on its own. A separate container polling for image updates added nothing except another thing needing Docker socket access on every host.
1 change: 0 additions & 1 deletion apps/semaphore/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@ services:
- 3000
labels:
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
- "com.centurylinklabs.watchtower.enable=true"
environment: *environment
depends_on:
- postgres
2 changes: 0 additions & 2 deletions apps/traefik/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,8 +4,6 @@ services:
traefik:
image: traefik
environment: *environment
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
Expand Down
37 changes: 0 additions & 37 deletions apps/watchtower/docker-compose.yml

This file was deleted.

18 changes: 5 additions & 13 deletions deploy/deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,6 @@
from vault import decrypt_env, parse_dotenv

APPS_BUNDLE_ASSET = "flightdeck-apps.zip"
WATCHTOWER_LABEL = "com.centurylinklabs.watchtower.enable=true"


class DeployError(Exception):
Expand DownExpand Up@@ -105,10 +104,6 @@ def list_required_networks(release_dir):
]


def is_watchtower_managed(compose_path):
return WATCHTOWER_LABEL in Path(compose_path).read_text()


def archive_release(release_dir, work_dir):
archive_path = work_dir / "release.tar.gz"
with tarfile.open(archive_path, "w:gz") as tar:
Expand DownExpand Up@@ -163,7 +158,7 @@ def prune_releases(connection, releases_path, keep_releases):
connection.run("rm -rf " + " ".join(shlex.quote(release) for release in stale), hide=True)


def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config):
def deploy_to_host(host, archive_path, rendered_configs, apps, networks, config):
connection = Connection(host)
connection.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Expand All@@ -179,12 +174,12 @@ def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, net
bootstrap_host(connection, base_path, networks)
push_release(connection, archive_path, release_path)
push_app_configs(connection, base_path, rendered_configs)
for app in all_apps:
for app in apps:
connection.run(f"mkdir -p {shlex.quote(f'{base_path}/apps-data/{app}')}", hide=True)

connection.run(f"ln -sfn {shlex.quote(release_path)} {shlex.quote(current_path)}", hide=True)

for app in run_apps:
for app in apps:
compose_dir = f"{current_path}/apps/{app}"
connection.run(f"cd {shlex.quote(compose_dir)} && docker compose pull && docker compose up -d --remove-orphans")

Expand DownExpand Up@@ -218,14 +213,11 @@ def main():
archive_path = archive_release(release_dir, work_dir)
networks = list_required_networks(release_dir)

all_apps = list(config["apps"])
run_apps = [
app for app in all_apps if not is_watchtower_managed(release_dir / "apps" / app / "docker-compose.yml")
]
apps = list(config["apps"])

for host in config["hosts"]:
print(f"Deploying to {host}")
deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config)
deploy_to_host(host, archive_path, rendered_configs, apps, networks, config)


if __name__ == "__main__":
Expand Down
19 changes: 2 additions & 17 deletions deploy/tests/test_deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -264,20 +264,6 @@ def test_returns_only_external_networks(self):
self.assertNotIn("internal", networks)


class IsWatchtowerManagedTest(unittest.TestCase):
def test_true_when_label_present(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text('labels:\n - "com.centurylinklabs.watchtower.enable=true"\n')
self.assertTrue(deploy.is_watchtower_managed(path))

def test_false_when_label_absent(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text("services: {}\n")
self.assertFalse(deploy.is_watchtower_managed(path))


class ArchiveReleaseTest(unittest.TestCase):
def test_archives_release_contents_without_wrapper_dir(self):
with tempfile.TemporaryDirectory() as directory:
Expand DownExpand Up@@ -337,8 +323,7 @@ def test_full_sequence(self):
"deploy@host",
archive_path,
rendered_configs,
all_apps=["traefik", "rybbit"],
run_apps=["rybbit"],
apps=["traefik", "rybbit"],
networks=["traefik", "databases", "mcp"],
config=config,
)
Expand All@@ -359,7 +344,7 @@ def test_full_sequence(self):
self.assertIn("mkdir -p /home/deploy/flightdeck/apps-data/rybbit", joined)
self.assertIn("ln -sfn", joined)
self.assertIn("apps/rybbit && docker compose pull && docker compose up -d --remove-orphans", joined)
self.assertNotIn("apps/traefik && docker compose", joined)
self.assertIn("apps/traefik && docker compose pull && docker compose up -d --remove-orphans", joined)

prune_command = next(command for command in fake.commands if command.startswith("rm -rf") and "rel" in command)
for stale in ("rel5", "rel6"):
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,16 +348,14 @@ Each app in a target's `apps` mapping lists its own `env_refs` — release refs

## Notable App Configurations

- **traefik**: Entry point, uses external network. Note: currently carries the Watchtower label (see below) - a target that doesn't also run a `watchtower` container (hawkeye doesn't, as of this writing) would never get `docker compose up` run for it by the automated path. Known gap, not yet resolved.
- **watchtower**: Infrastructure app — recommended on every server. Handles automatic image updates for apps that opt in via the `com.centurylinklabs.watchtower.enable=true` label. `deploy/deploy.py` skips running `docker compose pull`/`up` for any app with this label entirely, so Watchtower is their sole lifecycle manager.
- **traefik**: Entry point, uses external network.
- Apps with databases include a versioned template (e.g. `postgres-18.yml`) and create app-specific database named `${APP_NAME}`
- Config templates use `envsubst`-equivalent substitution (`deploy/render.py`) - variables must be shell-compatible (`${VAR}` syntax)

## Watchtower-managed Apps

Apps that carry the `com.centurylinklabs.watchtower.enable=true` label are updated automatically by Watchtower and are **skipped by `deploy/deploy.py`** - their `.env`/config still gets pushed on every deploy, but `docker compose pull`/`up` is never run for them. The label in the compose file is the single source of truth — no separate skip list exists.

Currently opted in: `traefik`, `semaphore`, `watchtower` itself.
Watchtower was dropped entirely (there is no `apps/watchtower/`, and no app
carries its label) — `deploy/deploy.py` already runs `docker compose pull &&
up -d` for every app in a target's `apps` mapping on every deploy, which
made Watchtower's own polling redundant. See `RETIRED.md`.

## Important: Template Files vs Generated Files

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ chmod 600 apps-data/traefik/acme.json

1. **Change Default Credentials** - Update vault-sourced secrets and re-deploy
2. **Use Strong Passwords** - Generate with: `openssl rand -base64 32`
3. **Keep Images Updated** - Watchtower-managed apps update automatically; others get the latest image on every deploy (`docker compose pull` runs before `up`)
3. **Keep Images Updated** - every deploy runs `docker compose pull` before `up`, so all apps get their latest image on every deploy
4. **Restrict Network Access** - Use firewall rules to limit access to Traefik ports (80, 443)
5. **Enable HTTPS** - Always use HTTPS, never expose HTTP to internet
6. **Backup Data** - Regularly back up `apps-data/` (backup automation is a separate, not-yet-decided piece of tooling)
Expand All@@ -217,6 +217,7 @@ chmod 600 apps-data/traefik/acme.json
## 📚 Additional Resources

- [AGENTS.md](AGENTS.md) - Technical documentation for AI agents and developers
- [RETIRED.md](RETIRED.md) - Apps removed from the active stack, and why
- [Docker Documentation](https://docs.docker.com/)
- [Docker Compose Documentation](https://docs.docker.com/compose/)
- [Traefik Documentation](https://doc.traefik.io/)
Expand Down
10 changes: 10 additions & 0 deletions RETIRED.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
# Retired Apps

Apps removed from the active stack. Technical details are recoverable from git history. Each entry captures only the human context: why the app was dropped.

---

## watchtower

- **Retired:** 2026-08-21
- **Reason:** Redundant once the deploy pipeline itself became idempotent — every deploy already runs `docker compose pull && up -d` for every app, which re-pulls and reconciles on its own. A separate container polling for image updates added nothing except another thing needing Docker socket access on every host.
1 change: 0 additions & 1 deletion apps/semaphore/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@ services:
- 3000
labels:
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
- "com.centurylinklabs.watchtower.enable=true"
environment: *environment
depends_on:
- postgres
2 changes: 0 additions & 2 deletions apps/traefik/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,8 +4,6 @@ services:
traefik:
image: traefik
environment: *environment
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
Expand Down
37 changes: 0 additions & 37 deletions apps/watchtower/docker-compose.yml

This file was deleted.

18 changes: 5 additions & 13 deletions deploy/deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,6 @@
from vault import decrypt_env, parse_dotenv

APPS_BUNDLE_ASSET = "flightdeck-apps.zip"
WATCHTOWER_LABEL = "com.centurylinklabs.watchtower.enable=true"


class DeployError(Exception):
Expand DownExpand Up@@ -105,10 +104,6 @@ def list_required_networks(release_dir):
]


def is_watchtower_managed(compose_path):
return WATCHTOWER_LABEL in Path(compose_path).read_text()


def archive_release(release_dir, work_dir):
archive_path = work_dir / "release.tar.gz"
with tarfile.open(archive_path, "w:gz") as tar:
Expand DownExpand Up@@ -163,7 +158,7 @@ def prune_releases(connection, releases_path, keep_releases):
connection.run("rm -rf " + " ".join(shlex.quote(release) for release in stale), hide=True)


def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config):
def deploy_to_host(host, archive_path, rendered_configs, apps, networks, config):
connection = Connection(host)
connection.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Expand All@@ -179,12 +174,12 @@ def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, net
bootstrap_host(connection, base_path, networks)
push_release(connection, archive_path, release_path)
push_app_configs(connection, base_path, rendered_configs)
for app in all_apps:
for app in apps:
connection.run(f"mkdir -p {shlex.quote(f'{base_path}/apps-data/{app}')}", hide=True)

connection.run(f"ln -sfn {shlex.quote(release_path)} {shlex.quote(current_path)}", hide=True)

for app in run_apps:
for app in apps:
compose_dir = f"{current_path}/apps/{app}"
connection.run(f"cd {shlex.quote(compose_dir)} && docker compose pull && docker compose up -d --remove-orphans")

Expand DownExpand Up@@ -218,14 +213,11 @@ def main():
archive_path = archive_release(release_dir, work_dir)
networks = list_required_networks(release_dir)

all_apps = list(config["apps"])
run_apps = [
app for app in all_apps if not is_watchtower_managed(release_dir / "apps" / app / "docker-compose.yml")
]
apps = list(config["apps"])

for host in config["hosts"]:
print(f"Deploying to {host}")
deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config)
deploy_to_host(host, archive_path, rendered_configs, apps, networks, config)


if __name__ == "__main__":
Expand Down
19 changes: 2 additions & 17 deletions deploy/tests/test_deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -264,20 +264,6 @@ def test_returns_only_external_networks(self):
self.assertNotIn("internal", networks)


class IsWatchtowerManagedTest(unittest.TestCase):
def test_true_when_label_present(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text('labels:\n - "com.centurylinklabs.watchtower.enable=true"\n')
self.assertTrue(deploy.is_watchtower_managed(path))

def test_false_when_label_absent(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text("services: {}\n")
self.assertFalse(deploy.is_watchtower_managed(path))


class ArchiveReleaseTest(unittest.TestCase):
def test_archives_release_contents_without_wrapper_dir(self):
with tempfile.TemporaryDirectory() as directory:
Expand DownExpand Up@@ -337,8 +323,7 @@ def test_full_sequence(self):
"deploy@host",
archive_path,
rendered_configs,
all_apps=["traefik", "rybbit"],
run_apps=["rybbit"],
apps=["traefik", "rybbit"],
networks=["traefik", "databases", "mcp"],
config=config,
)
Expand All@@ -359,7 +344,7 @@ def test_full_sequence(self):
self.assertIn("mkdir -p /home/deploy/flightdeck/apps-data/rybbit", joined)
self.assertIn("ln -sfn", joined)
self.assertIn("apps/rybbit && docker compose pull && docker compose up -d --remove-orphans", joined)
self.assertNotIn("apps/traefik && docker compose", joined)
self.assertIn("apps/traefik && docker compose pull && docker compose up -d --remove-orphans", joined)

prune_command = next(command for command in fake.commands if command.startswith("rm -rf") and "rel" in command)
for stale in ("rel5", "rel6"):
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,16 +348,14 @@ Each app in a target's `apps` mapping lists its own `env_refs` — release refs

## Notable App Configurations

- **traefik**: Entry point, uses external network. Note: currently carries the Watchtower label (see below) - a target that doesn't also run a `watchtower` container (hawkeye doesn't, as of this writing) would never get `docker compose up` run for it by the automated path. Known gap, not yet resolved.
- **watchtower**: Infrastructure app — recommended on every server. Handles automatic image updates for apps that opt in via the `com.centurylinklabs.watchtower.enable=true` label. `deploy/deploy.py` skips running `docker compose pull`/`up` for any app with this label entirely, so Watchtower is their sole lifecycle manager.
- **traefik**: Entry point, uses external network.
- Apps with databases include a versioned template (e.g. `postgres-18.yml`) and create app-specific database named `${APP_NAME}`
- Config templates use `envsubst`-equivalent substitution (`deploy/render.py`) - variables must be shell-compatible (`${VAR}` syntax)

## Watchtower-managed Apps

Apps that carry the `com.centurylinklabs.watchtower.enable=true` label are updated automatically by Watchtower and are **skipped by `deploy/deploy.py`** - their `.env`/config still gets pushed on every deploy, but `docker compose pull`/`up` is never run for them. The label in the compose file is the single source of truth — no separate skip list exists.

Currently opted in: `traefik`, `semaphore`, `watchtower` itself.
Watchtower was dropped entirely (there is no `apps/watchtower/`, and no app
carries its label) — `deploy/deploy.py` already runs `docker compose pull &&
up -d` for every app in a target's `apps` mapping on every deploy, which
made Watchtower's own polling redundant. See `RETIRED.md`.

## Important: Template Files vs Generated Files

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ chmod 600 apps-data/traefik/acme.json

1. **Change Default Credentials** - Update vault-sourced secrets and re-deploy
2. **Use Strong Passwords** - Generate with: `openssl rand -base64 32`
3. **Keep Images Updated** - Watchtower-managed apps update automatically; others get the latest image on every deploy (`docker compose pull` runs before `up`)
3. **Keep Images Updated** - every deploy runs `docker compose pull` before `up`, so all apps get their latest image on every deploy
4. **Restrict Network Access** - Use firewall rules to limit access to Traefik ports (80, 443)
5. **Enable HTTPS** - Always use HTTPS, never expose HTTP to internet
6. **Backup Data** - Regularly back up `apps-data/` (backup automation is a separate, not-yet-decided piece of tooling)
Expand All@@ -217,6 +217,7 @@ chmod 600 apps-data/traefik/acme.json
## 📚 Additional Resources

- [AGENTS.md](AGENTS.md) - Technical documentation for AI agents and developers
- [RETIRED.md](RETIRED.md) - Apps removed from the active stack, and why
- [Docker Documentation](https://docs.docker.com/)
- [Docker Compose Documentation](https://docs.docker.com/compose/)
- [Traefik Documentation](https://doc.traefik.io/)
Expand Down
10 changes: 10 additions & 0 deletions RETIRED.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
# Retired Apps

Apps removed from the active stack. Technical details are recoverable from git history. Each entry captures only the human context: why the app was dropped.

---

## watchtower

- **Retired:** 2026-08-21
- **Reason:** Redundant once the deploy pipeline itself became idempotent — every deploy already runs `docker compose pull && up -d` for every app, which re-pulls and reconciles on its own. A separate container polling for image updates added nothing except another thing needing Docker socket access on every host.
1 change: 0 additions & 1 deletion apps/semaphore/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@ services:
- 3000
labels:
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
- "com.centurylinklabs.watchtower.enable=true"
environment: *environment
depends_on:
- postgres
2 changes: 0 additions & 2 deletions apps/traefik/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,8 +4,6 @@ services:
traefik:
image: traefik
environment: *environment
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
Expand Down
37 changes: 0 additions & 37 deletions apps/watchtower/docker-compose.yml

This file was deleted.

18 changes: 5 additions & 13 deletions deploy/deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,6 @@
from vault import decrypt_env, parse_dotenv

APPS_BUNDLE_ASSET = "flightdeck-apps.zip"
WATCHTOWER_LABEL = "com.centurylinklabs.watchtower.enable=true"


class DeployError(Exception):
Expand DownExpand Up@@ -105,10 +104,6 @@ def list_required_networks(release_dir):
]


def is_watchtower_managed(compose_path):
return WATCHTOWER_LABEL in Path(compose_path).read_text()


def archive_release(release_dir, work_dir):
archive_path = work_dir / "release.tar.gz"
with tarfile.open(archive_path, "w:gz") as tar:
Expand DownExpand Up@@ -163,7 +158,7 @@ def prune_releases(connection, releases_path, keep_releases):
connection.run("rm -rf " + " ".join(shlex.quote(release) for release in stale), hide=True)


def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config):
def deploy_to_host(host, archive_path, rendered_configs, apps, networks, config):
connection = Connection(host)
connection.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Expand All@@ -179,12 +174,12 @@ def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, net
bootstrap_host(connection, base_path, networks)
push_release(connection, archive_path, release_path)
push_app_configs(connection, base_path, rendered_configs)
for app in all_apps:
for app in apps:
connection.run(f"mkdir -p {shlex.quote(f'{base_path}/apps-data/{app}')}", hide=True)

connection.run(f"ln -sfn {shlex.quote(release_path)} {shlex.quote(current_path)}", hide=True)

for app in run_apps:
for app in apps:
compose_dir = f"{current_path}/apps/{app}"
connection.run(f"cd {shlex.quote(compose_dir)} && docker compose pull && docker compose up -d --remove-orphans")

Expand DownExpand Up@@ -218,14 +213,11 @@ def main():
archive_path = archive_release(release_dir, work_dir)
networks = list_required_networks(release_dir)

all_apps = list(config["apps"])
run_apps = [
app for app in all_apps if not is_watchtower_managed(release_dir / "apps" / app / "docker-compose.yml")
]
apps = list(config["apps"])

for host in config["hosts"]:
print(f"Deploying to {host}")
deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config)
deploy_to_host(host, archive_path, rendered_configs, apps, networks, config)


if __name__ == "__main__":
Expand Down
19 changes: 2 additions & 17 deletions deploy/tests/test_deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -264,20 +264,6 @@ def test_returns_only_external_networks(self):
self.assertNotIn("internal", networks)


class IsWatchtowerManagedTest(unittest.TestCase):
def test_true_when_label_present(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text('labels:\n - "com.centurylinklabs.watchtower.enable=true"\n')
self.assertTrue(deploy.is_watchtower_managed(path))

def test_false_when_label_absent(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text("services: {}\n")
self.assertFalse(deploy.is_watchtower_managed(path))


class ArchiveReleaseTest(unittest.TestCase):
def test_archives_release_contents_without_wrapper_dir(self):
with tempfile.TemporaryDirectory() as directory:
Expand DownExpand Up@@ -337,8 +323,7 @@ def test_full_sequence(self):
"deploy@host",
archive_path,
rendered_configs,
all_apps=["traefik", "rybbit"],
run_apps=["rybbit"],
apps=["traefik", "rybbit"],
networks=["traefik", "databases", "mcp"],
config=config,
)
Expand All@@ -359,7 +344,7 @@ def test_full_sequence(self):
self.assertIn("mkdir -p /home/deploy/flightdeck/apps-data/rybbit", joined)
self.assertIn("ln -sfn", joined)
self.assertIn("apps/rybbit && docker compose pull && docker compose up -d --remove-orphans", joined)
self.assertNotIn("apps/traefik && docker compose", joined)
self.assertIn("apps/traefik && docker compose pull && docker compose up -d --remove-orphans", joined)

prune_command = next(command for command in fake.commands if command.startswith("rm -rf") and "rel" in command)
for stale in ("rel5", "rel6"):
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,16 +348,14 @@ Each app in a target's `apps` mapping lists its own `env_refs` — release refs

## Notable App Configurations

- **traefik**: Entry point, uses external network. Note: currently carries the Watchtower label (see below) - a target that doesn't also run a `watchtower` container (hawkeye doesn't, as of this writing) would never get `docker compose up` run for it by the automated path. Known gap, not yet resolved.
- **watchtower**: Infrastructure app — recommended on every server. Handles automatic image updates for apps that opt in via the `com.centurylinklabs.watchtower.enable=true` label. `deploy/deploy.py` skips running `docker compose pull`/`up` for any app with this label entirely, so Watchtower is their sole lifecycle manager.
- **traefik**: Entry point, uses external network.
- Apps with databases include a versioned template (e.g. `postgres-18.yml`) and create app-specific database named `${APP_NAME}`
- Config templates use `envsubst`-equivalent substitution (`deploy/render.py`) - variables must be shell-compatible (`${VAR}` syntax)

## Watchtower-managed Apps

Apps that carry the `com.centurylinklabs.watchtower.enable=true` label are updated automatically by Watchtower and are **skipped by `deploy/deploy.py`** - their `.env`/config still gets pushed on every deploy, but `docker compose pull`/`up` is never run for them. The label in the compose file is the single source of truth — no separate skip list exists.

Currently opted in: `traefik`, `semaphore`, `watchtower` itself.
Watchtower was dropped entirely (there is no `apps/watchtower/`, and no app
carries its label) — `deploy/deploy.py` already runs `docker compose pull &&
up -d` for every app in a target's `apps` mapping on every deploy, which
made Watchtower's own polling redundant. See `RETIRED.md`.

## Important: Template Files vs Generated Files

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ chmod 600 apps-data/traefik/acme.json

1. **Change Default Credentials** - Update vault-sourced secrets and re-deploy
2. **Use Strong Passwords** - Generate with: `openssl rand -base64 32`
3. **Keep Images Updated** - Watchtower-managed apps update automatically; others get the latest image on every deploy (`docker compose pull` runs before `up`)
3. **Keep Images Updated** - every deploy runs `docker compose pull` before `up`, so all apps get their latest image on every deploy
4. **Restrict Network Access** - Use firewall rules to limit access to Traefik ports (80, 443)
5. **Enable HTTPS** - Always use HTTPS, never expose HTTP to internet
6. **Backup Data** - Regularly back up `apps-data/` (backup automation is a separate, not-yet-decided piece of tooling)
Expand All@@ -217,6 +217,7 @@ chmod 600 apps-data/traefik/acme.json
## 📚 Additional Resources

- [AGENTS.md](AGENTS.md) - Technical documentation for AI agents and developers
- [RETIRED.md](RETIRED.md) - Apps removed from the active stack, and why
- [Docker Documentation](https://docs.docker.com/)
- [Docker Compose Documentation](https://docs.docker.com/compose/)
- [Traefik Documentation](https://doc.traefik.io/)
Expand Down
10 changes: 10 additions & 0 deletions RETIRED.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
# Retired Apps

Apps removed from the active stack. Technical details are recoverable from git history. Each entry captures only the human context: why the app was dropped.

---

## watchtower

- **Retired:** 2026-08-21
- **Reason:** Redundant once the deploy pipeline itself became idempotent — every deploy already runs `docker compose pull && up -d` for every app, which re-pulls and reconciles on its own. A separate container polling for image updates added nothing except another thing needing Docker socket access on every host.
1 change: 0 additions & 1 deletion apps/semaphore/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@ services:
- 3000
labels:
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
- "com.centurylinklabs.watchtower.enable=true"
environment: *environment
depends_on:
- postgres
2 changes: 0 additions & 2 deletions apps/traefik/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,8 +4,6 @@ services:
traefik:
image: traefik
environment: *environment
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
Expand Down
37 changes: 0 additions & 37 deletions apps/watchtower/docker-compose.yml

This file was deleted.

18 changes: 5 additions & 13 deletions deploy/deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,6 @@
from vault import decrypt_env, parse_dotenv

APPS_BUNDLE_ASSET = "flightdeck-apps.zip"
WATCHTOWER_LABEL = "com.centurylinklabs.watchtower.enable=true"


class DeployError(Exception):
Expand DownExpand Up@@ -105,10 +104,6 @@ def list_required_networks(release_dir):
]


def is_watchtower_managed(compose_path):
return WATCHTOWER_LABEL in Path(compose_path).read_text()


def archive_release(release_dir, work_dir):
archive_path = work_dir / "release.tar.gz"
with tarfile.open(archive_path, "w:gz") as tar:
Expand DownExpand Up@@ -163,7 +158,7 @@ def prune_releases(connection, releases_path, keep_releases):
connection.run("rm -rf " + " ".join(shlex.quote(release) for release in stale), hide=True)


def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config):
def deploy_to_host(host, archive_path, rendered_configs, apps, networks, config):
connection = Connection(host)
connection.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Expand All@@ -179,12 +174,12 @@ def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, net
bootstrap_host(connection, base_path, networks)
push_release(connection, archive_path, release_path)
push_app_configs(connection, base_path, rendered_configs)
for app in all_apps:
for app in apps:
connection.run(f"mkdir -p {shlex.quote(f'{base_path}/apps-data/{app}')}", hide=True)

connection.run(f"ln -sfn {shlex.quote(release_path)} {shlex.quote(current_path)}", hide=True)

for app in run_apps:
for app in apps:
compose_dir = f"{current_path}/apps/{app}"
connection.run(f"cd {shlex.quote(compose_dir)} && docker compose pull && docker compose up -d --remove-orphans")

Expand DownExpand Up@@ -218,14 +213,11 @@ def main():
archive_path = archive_release(release_dir, work_dir)
networks = list_required_networks(release_dir)

all_apps = list(config["apps"])
run_apps = [
app for app in all_apps if not is_watchtower_managed(release_dir / "apps" / app / "docker-compose.yml")
]
apps = list(config["apps"])

for host in config["hosts"]:
print(f"Deploying to {host}")
deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config)
deploy_to_host(host, archive_path, rendered_configs, apps, networks, config)


if __name__ == "__main__":
Expand Down
19 changes: 2 additions & 17 deletions deploy/tests/test_deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -264,20 +264,6 @@ def test_returns_only_external_networks(self):
self.assertNotIn("internal", networks)


class IsWatchtowerManagedTest(unittest.TestCase):
def test_true_when_label_present(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text('labels:\n - "com.centurylinklabs.watchtower.enable=true"\n')
self.assertTrue(deploy.is_watchtower_managed(path))

def test_false_when_label_absent(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text("services: {}\n")
self.assertFalse(deploy.is_watchtower_managed(path))


class ArchiveReleaseTest(unittest.TestCase):
def test_archives_release_contents_without_wrapper_dir(self):
with tempfile.TemporaryDirectory() as directory:
Expand DownExpand Up@@ -337,8 +323,7 @@ def test_full_sequence(self):
"deploy@host",
archive_path,
rendered_configs,
all_apps=["traefik", "rybbit"],
run_apps=["rybbit"],
apps=["traefik", "rybbit"],
networks=["traefik", "databases", "mcp"],
config=config,
)
Expand All@@ -359,7 +344,7 @@ def test_full_sequence(self):
self.assertIn("mkdir -p /home/deploy/flightdeck/apps-data/rybbit", joined)
self.assertIn("ln -sfn", joined)
self.assertIn("apps/rybbit && docker compose pull && docker compose up -d --remove-orphans", joined)
self.assertNotIn("apps/traefik && docker compose", joined)
self.assertIn("apps/traefik && docker compose pull && docker compose up -d --remove-orphans", joined)

prune_command = next(command for command in fake.commands if command.startswith("rm -rf") and "rel" in command)
for stale in ("rel5", "rel6"):
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,16 +348,14 @@ Each app in a target's `apps` mapping lists its own `env_refs` — release refs

## Notable App Configurations

- **traefik**: Entry point, uses external network. Note: currently carries the Watchtower label (see below) - a target that doesn't also run a `watchtower` container (hawkeye doesn't, as of this writing) would never get `docker compose up` run for it by the automated path. Known gap, not yet resolved.
- **watchtower**: Infrastructure app — recommended on every server. Handles automatic image updates for apps that opt in via the `com.centurylinklabs.watchtower.enable=true` label. `deploy/deploy.py` skips running `docker compose pull`/`up` for any app with this label entirely, so Watchtower is their sole lifecycle manager.
- **traefik**: Entry point, uses external network.
- Apps with databases include a versioned template (e.g. `postgres-18.yml`) and create app-specific database named `${APP_NAME}`
- Config templates use `envsubst`-equivalent substitution (`deploy/render.py`) - variables must be shell-compatible (`${VAR}` syntax)

## Watchtower-managed Apps

Apps that carry the `com.centurylinklabs.watchtower.enable=true` label are updated automatically by Watchtower and are **skipped by `deploy/deploy.py`** - their `.env`/config still gets pushed on every deploy, but `docker compose pull`/`up` is never run for them. The label in the compose file is the single source of truth — no separate skip list exists.

Currently opted in: `traefik`, `semaphore`, `watchtower` itself.
Watchtower was dropped entirely (there is no `apps/watchtower/`, and no app
carries its label) — `deploy/deploy.py` already runs `docker compose pull &&
up -d` for every app in a target's `apps` mapping on every deploy, which
made Watchtower's own polling redundant. See `RETIRED.md`.

## Important: Template Files vs Generated Files

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ chmod 600 apps-data/traefik/acme.json

1. **Change Default Credentials** - Update vault-sourced secrets and re-deploy
2. **Use Strong Passwords** - Generate with: `openssl rand -base64 32`
3. **Keep Images Updated** - Watchtower-managed apps update automatically; others get the latest image on every deploy (`docker compose pull` runs before `up`)
3. **Keep Images Updated** - every deploy runs `docker compose pull` before `up`, so all apps get their latest image on every deploy
4. **Restrict Network Access** - Use firewall rules to limit access to Traefik ports (80, 443)
5. **Enable HTTPS** - Always use HTTPS, never expose HTTP to internet
6. **Backup Data** - Regularly back up `apps-data/` (backup automation is a separate, not-yet-decided piece of tooling)
Expand All@@ -217,6 +217,7 @@ chmod 600 apps-data/traefik/acme.json
## 📚 Additional Resources

- [AGENTS.md](AGENTS.md) - Technical documentation for AI agents and developers
- [RETIRED.md](RETIRED.md) - Apps removed from the active stack, and why
- [Docker Documentation](https://docs.docker.com/)
- [Docker Compose Documentation](https://docs.docker.com/compose/)
- [Traefik Documentation](https://doc.traefik.io/)
Expand Down
10 changes: 10 additions & 0 deletions RETIRED.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
# Retired Apps

Apps removed from the active stack. Technical details are recoverable from git history. Each entry captures only the human context: why the app was dropped.

---

## watchtower

- **Retired:** 2026-08-21
- **Reason:** Redundant once the deploy pipeline itself became idempotent — every deploy already runs `docker compose pull && up -d` for every app, which re-pulls and reconciles on its own. A separate container polling for image updates added nothing except another thing needing Docker socket access on every host.
1 change: 0 additions & 1 deletion apps/semaphore/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@ services:
- 3000
labels:
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
- "com.centurylinklabs.watchtower.enable=true"
environment: *environment
depends_on:
- postgres
2 changes: 0 additions & 2 deletions apps/traefik/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,8 +4,6 @@ services:
traefik:
image: traefik
environment: *environment
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
Expand Down
37 changes: 0 additions & 37 deletions apps/watchtower/docker-compose.yml

This file was deleted.

18 changes: 5 additions & 13 deletions deploy/deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,6 @@
from vault import decrypt_env, parse_dotenv

APPS_BUNDLE_ASSET = "flightdeck-apps.zip"
WATCHTOWER_LABEL = "com.centurylinklabs.watchtower.enable=true"


class DeployError(Exception):
Expand DownExpand Up@@ -105,10 +104,6 @@ def list_required_networks(release_dir):
]


def is_watchtower_managed(compose_path):
return WATCHTOWER_LABEL in Path(compose_path).read_text()


def archive_release(release_dir, work_dir):
archive_path = work_dir / "release.tar.gz"
with tarfile.open(archive_path, "w:gz") as tar:
Expand DownExpand Up@@ -163,7 +158,7 @@ def prune_releases(connection, releases_path, keep_releases):
connection.run("rm -rf " + " ".join(shlex.quote(release) for release in stale), hide=True)


def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config):
def deploy_to_host(host, archive_path, rendered_configs, apps, networks, config):
connection = Connection(host)
connection.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Expand All@@ -179,12 +174,12 @@ def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, net
bootstrap_host(connection, base_path, networks)
push_release(connection, archive_path, release_path)
push_app_configs(connection, base_path, rendered_configs)
for app in all_apps:
for app in apps:
connection.run(f"mkdir -p {shlex.quote(f'{base_path}/apps-data/{app}')}", hide=True)

connection.run(f"ln -sfn {shlex.quote(release_path)} {shlex.quote(current_path)}", hide=True)

for app in run_apps:
for app in apps:
compose_dir = f"{current_path}/apps/{app}"
connection.run(f"cd {shlex.quote(compose_dir)} && docker compose pull && docker compose up -d --remove-orphans")

Expand DownExpand Up@@ -218,14 +213,11 @@ def main():
archive_path = archive_release(release_dir, work_dir)
networks = list_required_networks(release_dir)

all_apps = list(config["apps"])
run_apps = [
app for app in all_apps if not is_watchtower_managed(release_dir / "apps" / app / "docker-compose.yml")
]
apps = list(config["apps"])

for host in config["hosts"]:
print(f"Deploying to {host}")
deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config)
deploy_to_host(host, archive_path, rendered_configs, apps, networks, config)


if __name__ == "__main__":
Expand Down
19 changes: 2 additions & 17 deletions deploy/tests/test_deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -264,20 +264,6 @@ def test_returns_only_external_networks(self):
self.assertNotIn("internal", networks)


class IsWatchtowerManagedTest(unittest.TestCase):
def test_true_when_label_present(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text('labels:\n - "com.centurylinklabs.watchtower.enable=true"\n')
self.assertTrue(deploy.is_watchtower_managed(path))

def test_false_when_label_absent(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text("services: {}\n")
self.assertFalse(deploy.is_watchtower_managed(path))


class ArchiveReleaseTest(unittest.TestCase):
def test_archives_release_contents_without_wrapper_dir(self):
with tempfile.TemporaryDirectory() as directory:
Expand DownExpand Up@@ -337,8 +323,7 @@ def test_full_sequence(self):
"deploy@host",
archive_path,
rendered_configs,
all_apps=["traefik", "rybbit"],
run_apps=["rybbit"],
apps=["traefik", "rybbit"],
networks=["traefik", "databases", "mcp"],
config=config,
)
Expand All@@ -359,7 +344,7 @@ def test_full_sequence(self):
self.assertIn("mkdir -p /home/deploy/flightdeck/apps-data/rybbit", joined)
self.assertIn("ln -sfn", joined)
self.assertIn("apps/rybbit && docker compose pull && docker compose up -d --remove-orphans", joined)
self.assertNotIn("apps/traefik && docker compose", joined)
self.assertIn("apps/traefik && docker compose pull && docker compose up -d --remove-orphans", joined)

prune_command = next(command for command in fake.commands if command.startswith("rm -rf") and "rel" in command)
for stale in ("rel5", "rel6"):
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,16 +348,14 @@ Each app in a target's `apps` mapping lists its own `env_refs` — release refs

## Notable App Configurations

- **traefik**: Entry point, uses external network. Note: currently carries the Watchtower label (see below) - a target that doesn't also run a `watchtower` container (hawkeye doesn't, as of this writing) would never get `docker compose up` run for it by the automated path. Known gap, not yet resolved.
- **watchtower**: Infrastructure app — recommended on every server. Handles automatic image updates for apps that opt in via the `com.centurylinklabs.watchtower.enable=true` label. `deploy/deploy.py` skips running `docker compose pull`/`up` for any app with this label entirely, so Watchtower is their sole lifecycle manager.
- **traefik**: Entry point, uses external network.
- Apps with databases include a versioned template (e.g. `postgres-18.yml`) and create app-specific database named `${APP_NAME}`
- Config templates use `envsubst`-equivalent substitution (`deploy/render.py`) - variables must be shell-compatible (`${VAR}` syntax)

## Watchtower-managed Apps

Apps that carry the `com.centurylinklabs.watchtower.enable=true` label are updated automatically by Watchtower and are **skipped by `deploy/deploy.py`** - their `.env`/config still gets pushed on every deploy, but `docker compose pull`/`up` is never run for them. The label in the compose file is the single source of truth — no separate skip list exists.

Currently opted in: `traefik`, `semaphore`, `watchtower` itself.
Watchtower was dropped entirely (there is no `apps/watchtower/`, and no app
carries its label) — `deploy/deploy.py` already runs `docker compose pull &&
up -d` for every app in a target's `apps` mapping on every deploy, which
made Watchtower's own polling redundant. See `RETIRED.md`.

## Important: Template Files vs Generated Files

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ chmod 600 apps-data/traefik/acme.json

1. **Change Default Credentials** - Update vault-sourced secrets and re-deploy
2. **Use Strong Passwords** - Generate with: `openssl rand -base64 32`
3. **Keep Images Updated** - Watchtower-managed apps update automatically; others get the latest image on every deploy (`docker compose pull` runs before `up`)
3. **Keep Images Updated** - every deploy runs `docker compose pull` before `up`, so all apps get their latest image on every deploy
4. **Restrict Network Access** - Use firewall rules to limit access to Traefik ports (80, 443)
5. **Enable HTTPS** - Always use HTTPS, never expose HTTP to internet
6. **Backup Data** - Regularly back up `apps-data/` (backup automation is a separate, not-yet-decided piece of tooling)
Expand All@@ -217,6 +217,7 @@ chmod 600 apps-data/traefik/acme.json
## 📚 Additional Resources

- [AGENTS.md](AGENTS.md) - Technical documentation for AI agents and developers
- [RETIRED.md](RETIRED.md) - Apps removed from the active stack, and why
- [Docker Documentation](https://docs.docker.com/)
- [Docker Compose Documentation](https://docs.docker.com/compose/)
- [Traefik Documentation](https://doc.traefik.io/)
Expand Down
10 changes: 10 additions & 0 deletions RETIRED.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
# Retired Apps

Apps removed from the active stack. Technical details are recoverable from git history. Each entry captures only the human context: why the app was dropped.

---

## watchtower

- **Retired:** 2026-08-21
- **Reason:** Redundant once the deploy pipeline itself became idempotent — every deploy already runs `docker compose pull && up -d` for every app, which re-pulls and reconciles on its own. A separate container polling for image updates added nothing except another thing needing Docker socket access on every host.
1 change: 0 additions & 1 deletion apps/semaphore/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@ services:
- 3000
labels:
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
- "com.centurylinklabs.watchtower.enable=true"
environment: *environment
depends_on:
- postgres
2 changes: 0 additions & 2 deletions apps/traefik/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,8 +4,6 @@ services:
traefik:
image: traefik
environment: *environment
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
Expand Down
37 changes: 0 additions & 37 deletions apps/watchtower/docker-compose.yml

This file was deleted.

18 changes: 5 additions & 13 deletions deploy/deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,6 @@
from vault import decrypt_env, parse_dotenv

APPS_BUNDLE_ASSET = "flightdeck-apps.zip"
WATCHTOWER_LABEL = "com.centurylinklabs.watchtower.enable=true"


class DeployError(Exception):
Expand DownExpand Up@@ -105,10 +104,6 @@ def list_required_networks(release_dir):
]


def is_watchtower_managed(compose_path):
return WATCHTOWER_LABEL in Path(compose_path).read_text()


def archive_release(release_dir, work_dir):
archive_path = work_dir / "release.tar.gz"
with tarfile.open(archive_path, "w:gz") as tar:
Expand DownExpand Up@@ -163,7 +158,7 @@ def prune_releases(connection, releases_path, keep_releases):
connection.run("rm -rf " + " ".join(shlex.quote(release) for release in stale), hide=True)


def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config):
def deploy_to_host(host, archive_path, rendered_configs, apps, networks, config):
connection = Connection(host)
connection.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Expand All@@ -179,12 +174,12 @@ def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, net
bootstrap_host(connection, base_path, networks)
push_release(connection, archive_path, release_path)
push_app_configs(connection, base_path, rendered_configs)
for app in all_apps:
for app in apps:
connection.run(f"mkdir -p {shlex.quote(f'{base_path}/apps-data/{app}')}", hide=True)

connection.run(f"ln -sfn {shlex.quote(release_path)} {shlex.quote(current_path)}", hide=True)

for app in run_apps:
for app in apps:
compose_dir = f"{current_path}/apps/{app}"
connection.run(f"cd {shlex.quote(compose_dir)} && docker compose pull && docker compose up -d --remove-orphans")

Expand DownExpand Up@@ -218,14 +213,11 @@ def main():
archive_path = archive_release(release_dir, work_dir)
networks = list_required_networks(release_dir)

all_apps = list(config["apps"])
run_apps = [
app for app in all_apps if not is_watchtower_managed(release_dir / "apps" / app / "docker-compose.yml")
]
apps = list(config["apps"])

for host in config["hosts"]:
print(f"Deploying to {host}")
deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config)
deploy_to_host(host, archive_path, rendered_configs, apps, networks, config)


if __name__ == "__main__":
Expand Down
19 changes: 2 additions & 17 deletions deploy/tests/test_deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -264,20 +264,6 @@ def test_returns_only_external_networks(self):
self.assertNotIn("internal", networks)


class IsWatchtowerManagedTest(unittest.TestCase):
def test_true_when_label_present(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text('labels:\n - "com.centurylinklabs.watchtower.enable=true"\n')
self.assertTrue(deploy.is_watchtower_managed(path))

def test_false_when_label_absent(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text("services: {}\n")
self.assertFalse(deploy.is_watchtower_managed(path))


class ArchiveReleaseTest(unittest.TestCase):
def test_archives_release_contents_without_wrapper_dir(self):
with tempfile.TemporaryDirectory() as directory:
Expand DownExpand Up@@ -337,8 +323,7 @@ def test_full_sequence(self):
"deploy@host",
archive_path,
rendered_configs,
all_apps=["traefik", "rybbit"],
run_apps=["rybbit"],
apps=["traefik", "rybbit"],
networks=["traefik", "databases", "mcp"],
config=config,
)
Expand All@@ -359,7 +344,7 @@ def test_full_sequence(self):
self.assertIn("mkdir -p /home/deploy/flightdeck/apps-data/rybbit", joined)
self.assertIn("ln -sfn", joined)
self.assertIn("apps/rybbit && docker compose pull && docker compose up -d --remove-orphans", joined)
self.assertNotIn("apps/traefik && docker compose", joined)
self.assertIn("apps/traefik && docker compose pull && docker compose up -d --remove-orphans", joined)

prune_command = next(command for command in fake.commands if command.startswith("rm -rf") and "rel" in command)
for stale in ("rel5", "rel6"):
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,16 +348,14 @@ Each app in a target's `apps` mapping lists its own `env_refs` — release refs

## Notable App Configurations

- **traefik**: Entry point, uses external network. Note: currently carries the Watchtower label (see below) - a target that doesn't also run a `watchtower` container (hawkeye doesn't, as of this writing) would never get `docker compose up` run for it by the automated path. Known gap, not yet resolved.
- **watchtower**: Infrastructure app — recommended on every server. Handles automatic image updates for apps that opt in via the `com.centurylinklabs.watchtower.enable=true` label. `deploy/deploy.py` skips running `docker compose pull`/`up` for any app with this label entirely, so Watchtower is their sole lifecycle manager.
- **traefik**: Entry point, uses external network.
- Apps with databases include a versioned template (e.g. `postgres-18.yml`) and create app-specific database named `${APP_NAME}`
- Config templates use `envsubst`-equivalent substitution (`deploy/render.py`) - variables must be shell-compatible (`${VAR}` syntax)

## Watchtower-managed Apps

Apps that carry the `com.centurylinklabs.watchtower.enable=true` label are updated automatically by Watchtower and are **skipped by `deploy/deploy.py`** - their `.env`/config still gets pushed on every deploy, but `docker compose pull`/`up` is never run for them. The label in the compose file is the single source of truth — no separate skip list exists.

Currently opted in: `traefik`, `semaphore`, `watchtower` itself.
Watchtower was dropped entirely (there is no `apps/watchtower/`, and no app
carries its label) — `deploy/deploy.py` already runs `docker compose pull &&
up -d` for every app in a target's `apps` mapping on every deploy, which
made Watchtower's own polling redundant. See `RETIRED.md`.

## Important: Template Files vs Generated Files

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ chmod 600 apps-data/traefik/acme.json

1. **Change Default Credentials** - Update vault-sourced secrets and re-deploy
2. **Use Strong Passwords** - Generate with: `openssl rand -base64 32`
3. **Keep Images Updated** - Watchtower-managed apps update automatically; others get the latest image on every deploy (`docker compose pull` runs before `up`)
3. **Keep Images Updated** - every deploy runs `docker compose pull` before `up`, so all apps get their latest image on every deploy
4. **Restrict Network Access** - Use firewall rules to limit access to Traefik ports (80, 443)
5. **Enable HTTPS** - Always use HTTPS, never expose HTTP to internet
6. **Backup Data** - Regularly back up `apps-data/` (backup automation is a separate, not-yet-decided piece of tooling)
Expand All@@ -217,6 +217,7 @@ chmod 600 apps-data/traefik/acme.json
## 📚 Additional Resources

- [AGENTS.md](AGENTS.md) - Technical documentation for AI agents and developers
- [RETIRED.md](RETIRED.md) - Apps removed from the active stack, and why
- [Docker Documentation](https://docs.docker.com/)
- [Docker Compose Documentation](https://docs.docker.com/compose/)
- [Traefik Documentation](https://doc.traefik.io/)
Expand Down
10 changes: 10 additions & 0 deletions RETIRED.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
# Retired Apps

Apps removed from the active stack. Technical details are recoverable from git history. Each entry captures only the human context: why the app was dropped.

---

## watchtower

- **Retired:** 2026-08-21
- **Reason:** Redundant once the deploy pipeline itself became idempotent — every deploy already runs `docker compose pull && up -d` for every app, which re-pulls and reconciles on its own. A separate container polling for image updates added nothing except another thing needing Docker socket access on every host.
1 change: 0 additions & 1 deletion apps/semaphore/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@ services:
- 3000
labels:
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
- "com.centurylinklabs.watchtower.enable=true"
environment: *environment
depends_on:
- postgres
2 changes: 0 additions & 2 deletions apps/traefik/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,8 +4,6 @@ services:
traefik:
image: traefik
environment: *environment
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
Expand Down
37 changes: 0 additions & 37 deletions apps/watchtower/docker-compose.yml

This file was deleted.

18 changes: 5 additions & 13 deletions deploy/deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,6 @@
from vault import decrypt_env, parse_dotenv

APPS_BUNDLE_ASSET = "flightdeck-apps.zip"
WATCHTOWER_LABEL = "com.centurylinklabs.watchtower.enable=true"


class DeployError(Exception):
Expand DownExpand Up@@ -105,10 +104,6 @@ def list_required_networks(release_dir):
]


def is_watchtower_managed(compose_path):
return WATCHTOWER_LABEL in Path(compose_path).read_text()


def archive_release(release_dir, work_dir):
archive_path = work_dir / "release.tar.gz"
with tarfile.open(archive_path, "w:gz") as tar:
Expand DownExpand Up@@ -163,7 +158,7 @@ def prune_releases(connection, releases_path, keep_releases):
connection.run("rm -rf " + " ".join(shlex.quote(release) for release in stale), hide=True)


def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config):
def deploy_to_host(host, archive_path, rendered_configs, apps, networks, config):
connection = Connection(host)
connection.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Expand All@@ -179,12 +174,12 @@ def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, net
bootstrap_host(connection, base_path, networks)
push_release(connection, archive_path, release_path)
push_app_configs(connection, base_path, rendered_configs)
for app in all_apps:
for app in apps:
connection.run(f"mkdir -p {shlex.quote(f'{base_path}/apps-data/{app}')}", hide=True)

connection.run(f"ln -sfn {shlex.quote(release_path)} {shlex.quote(current_path)}", hide=True)

for app in run_apps:
for app in apps:
compose_dir = f"{current_path}/apps/{app}"
connection.run(f"cd {shlex.quote(compose_dir)} && docker compose pull && docker compose up -d --remove-orphans")

Expand DownExpand Up@@ -218,14 +213,11 @@ def main():
archive_path = archive_release(release_dir, work_dir)
networks = list_required_networks(release_dir)

all_apps = list(config["apps"])
run_apps = [
app for app in all_apps if not is_watchtower_managed(release_dir / "apps" / app / "docker-compose.yml")
]
apps = list(config["apps"])

for host in config["hosts"]:
print(f"Deploying to {host}")
deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config)
deploy_to_host(host, archive_path, rendered_configs, apps, networks, config)


if __name__ == "__main__":
Expand Down
19 changes: 2 additions & 17 deletions deploy/tests/test_deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -264,20 +264,6 @@ def test_returns_only_external_networks(self):
self.assertNotIn("internal", networks)


class IsWatchtowerManagedTest(unittest.TestCase):
def test_true_when_label_present(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text('labels:\n - "com.centurylinklabs.watchtower.enable=true"\n')
self.assertTrue(deploy.is_watchtower_managed(path))

def test_false_when_label_absent(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text("services: {}\n")
self.assertFalse(deploy.is_watchtower_managed(path))


class ArchiveReleaseTest(unittest.TestCase):
def test_archives_release_contents_without_wrapper_dir(self):
with tempfile.TemporaryDirectory() as directory:
Expand DownExpand Up@@ -337,8 +323,7 @@ def test_full_sequence(self):
"deploy@host",
archive_path,
rendered_configs,
all_apps=["traefik", "rybbit"],
run_apps=["rybbit"],
apps=["traefik", "rybbit"],
networks=["traefik", "databases", "mcp"],
config=config,
)
Expand All@@ -359,7 +344,7 @@ def test_full_sequence(self):
self.assertIn("mkdir -p /home/deploy/flightdeck/apps-data/rybbit", joined)
self.assertIn("ln -sfn", joined)
self.assertIn("apps/rybbit && docker compose pull && docker compose up -d --remove-orphans", joined)
self.assertNotIn("apps/traefik && docker compose", joined)
self.assertIn("apps/traefik && docker compose pull && docker compose up -d --remove-orphans", joined)

prune_command = next(command for command in fake.commands if command.startswith("rm -rf") and "rel" in command)
for stale in ("rel5", "rel6"):
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,16 +348,14 @@ Each app in a target's `apps` mapping lists its own `env_refs` — release refs

## Notable App Configurations

- **traefik**: Entry point, uses external network. Note: currently carries the Watchtower label (see below) - a target that doesn't also run a `watchtower` container (hawkeye doesn't, as of this writing) would never get `docker compose up` run for it by the automated path. Known gap, not yet resolved.
- **watchtower**: Infrastructure app — recommended on every server. Handles automatic image updates for apps that opt in via the `com.centurylinklabs.watchtower.enable=true` label. `deploy/deploy.py` skips running `docker compose pull`/`up` for any app with this label entirely, so Watchtower is their sole lifecycle manager.
- **traefik**: Entry point, uses external network.
- Apps with databases include a versioned template (e.g. `postgres-18.yml`) and create app-specific database named `${APP_NAME}`
- Config templates use `envsubst`-equivalent substitution (`deploy/render.py`) - variables must be shell-compatible (`${VAR}` syntax)

## Watchtower-managed Apps

Apps that carry the `com.centurylinklabs.watchtower.enable=true` label are updated automatically by Watchtower and are **skipped by `deploy/deploy.py`** - their `.env`/config still gets pushed on every deploy, but `docker compose pull`/`up` is never run for them. The label in the compose file is the single source of truth — no separate skip list exists.

Currently opted in: `traefik`, `semaphore`, `watchtower` itself.
Watchtower was dropped entirely (there is no `apps/watchtower/`, and no app
carries its label) — `deploy/deploy.py` already runs `docker compose pull &&
up -d` for every app in a target's `apps` mapping on every deploy, which
made Watchtower's own polling redundant. See `RETIRED.md`.

## Important: Template Files vs Generated Files

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ chmod 600 apps-data/traefik/acme.json

1. **Change Default Credentials** - Update vault-sourced secrets and re-deploy
2. **Use Strong Passwords** - Generate with: `openssl rand -base64 32`
3. **Keep Images Updated** - Watchtower-managed apps update automatically; others get the latest image on every deploy (`docker compose pull` runs before `up`)
3. **Keep Images Updated** - every deploy runs `docker compose pull` before `up`, so all apps get their latest image on every deploy
4. **Restrict Network Access** - Use firewall rules to limit access to Traefik ports (80, 443)
5. **Enable HTTPS** - Always use HTTPS, never expose HTTP to internet
6. **Backup Data** - Regularly back up `apps-data/` (backup automation is a separate, not-yet-decided piece of tooling)
Expand All@@ -217,6 +217,7 @@ chmod 600 apps-data/traefik/acme.json
## 📚 Additional Resources

- [AGENTS.md](AGENTS.md) - Technical documentation for AI agents and developers
- [RETIRED.md](RETIRED.md) - Apps removed from the active stack, and why
- [Docker Documentation](https://docs.docker.com/)
- [Docker Compose Documentation](https://docs.docker.com/compose/)
- [Traefik Documentation](https://doc.traefik.io/)
Expand Down
10 changes: 10 additions & 0 deletions RETIRED.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
# Retired Apps

Apps removed from the active stack. Technical details are recoverable from git history. Each entry captures only the human context: why the app was dropped.

---

## watchtower

- **Retired:** 2026-08-21
- **Reason:** Redundant once the deploy pipeline itself became idempotent — every deploy already runs `docker compose pull && up -d` for every app, which re-pulls and reconciles on its own. A separate container polling for image updates added nothing except another thing needing Docker socket access on every host.
1 change: 0 additions & 1 deletion apps/semaphore/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@ services:
- 3000
labels:
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
- "com.centurylinklabs.watchtower.enable=true"
environment: *environment
depends_on:
- postgres
2 changes: 0 additions & 2 deletions apps/traefik/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,8 +4,6 @@ services:
traefik:
image: traefik
environment: *environment
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
Expand Down
37 changes: 0 additions & 37 deletions apps/watchtower/docker-compose.yml

This file was deleted.

18 changes: 5 additions & 13 deletions deploy/deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,6 @@
from vault import decrypt_env, parse_dotenv

APPS_BUNDLE_ASSET = "flightdeck-apps.zip"
WATCHTOWER_LABEL = "com.centurylinklabs.watchtower.enable=true"


class DeployError(Exception):
Expand DownExpand Up@@ -105,10 +104,6 @@ def list_required_networks(release_dir):
]


def is_watchtower_managed(compose_path):
return WATCHTOWER_LABEL in Path(compose_path).read_text()


def archive_release(release_dir, work_dir):
archive_path = work_dir / "release.tar.gz"
with tarfile.open(archive_path, "w:gz") as tar:
Expand DownExpand Up@@ -163,7 +158,7 @@ def prune_releases(connection, releases_path, keep_releases):
connection.run("rm -rf " + " ".join(shlex.quote(release) for release in stale), hide=True)


def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config):
def deploy_to_host(host, archive_path, rendered_configs, apps, networks, config):
connection = Connection(host)
connection.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Expand All@@ -179,12 +174,12 @@ def deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, net
bootstrap_host(connection, base_path, networks)
push_release(connection, archive_path, release_path)
push_app_configs(connection, base_path, rendered_configs)
for app in all_apps:
for app in apps:
connection.run(f"mkdir -p {shlex.quote(f'{base_path}/apps-data/{app}')}", hide=True)

connection.run(f"ln -sfn {shlex.quote(release_path)} {shlex.quote(current_path)}", hide=True)

for app in run_apps:
for app in apps:
compose_dir = f"{current_path}/apps/{app}"
connection.run(f"cd {shlex.quote(compose_dir)} && docker compose pull && docker compose up -d --remove-orphans")

Expand DownExpand Up@@ -218,14 +213,11 @@ def main():
archive_path = archive_release(release_dir, work_dir)
networks = list_required_networks(release_dir)

all_apps = list(config["apps"])
run_apps = [
app for app in all_apps if not is_watchtower_managed(release_dir / "apps" / app / "docker-compose.yml")
]
apps = list(config["apps"])

for host in config["hosts"]:
print(f"Deploying to {host}")
deploy_to_host(host, archive_path, rendered_configs, all_apps, run_apps, networks, config)
deploy_to_host(host, archive_path, rendered_configs, apps, networks, config)


if __name__ == "__main__":
Expand Down
19 changes: 2 additions & 17 deletions deploy/tests/test_deploy.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -264,20 +264,6 @@ def test_returns_only_external_networks(self):
self.assertNotIn("internal", networks)


class IsWatchtowerManagedTest(unittest.TestCase):
def test_true_when_label_present(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text('labels:\n - "com.centurylinklabs.watchtower.enable=true"\n')
self.assertTrue(deploy.is_watchtower_managed(path))

def test_false_when_label_absent(self):
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "docker-compose.yml"
path.write_text("services: {}\n")
self.assertFalse(deploy.is_watchtower_managed(path))


class ArchiveReleaseTest(unittest.TestCase):
def test_archives_release_contents_without_wrapper_dir(self):
with tempfile.TemporaryDirectory() as directory:
Expand DownExpand Up@@ -337,8 +323,7 @@ def test_full_sequence(self):
"deploy@host",
archive_path,
rendered_configs,
all_apps=["traefik", "rybbit"],
run_apps=["rybbit"],
apps=["traefik", "rybbit"],
networks=["traefik", "databases", "mcp"],
config=config,
)
Expand All@@ -359,7 +344,7 @@ def test_full_sequence(self):
self.assertIn("mkdir -p /home/deploy/flightdeck/apps-data/rybbit", joined)
self.assertIn("ln -sfn", joined)
self.assertIn("apps/rybbit && docker compose pull && docker compose up -d --remove-orphans", joined)
self.assertNotIn("apps/traefik && docker compose", joined)
self.assertIn("apps/traefik && docker compose pull && docker compose up -d --remove-orphans", joined)

prune_command = next(command for command in fake.commands if command.startswith("rm -rf") and "rel" in command)
for stale in ("rel5", "rel6"):
Expand Down