diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 000000000..fd47ede44 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,29 @@ +# Builds and pushes the archied and archie-agent images on every merge +# to main. carina's watchtower container (see docker-compose.yml) picks +# up the new images and restarts the running daemons — this workflow +# never touches carina directly. +name: deploy + +on: + push: + branches: [main] + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Log in to registry + run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u sam --password-stdin + + - name: Build and push archied + run: | + docker build -f Dockerfile.archied -t git.catlow.cloud/sam/archied:latest . + docker push git.catlow.cloud/sam/archied:latest + + - name: Build and push archie-agent + run: | + docker build -f Dockerfile -t git.catlow.cloud/sam/archie-agent:latest . + docker push git.catlow.cloud/sam/archie-agent:latest diff --git a/docker-compose.yml b/docker-compose.yml index e9ec20706..45882482b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,5 +53,20 @@ services: entrypoint: [""] restart: "no" + # ── deploy watcher ────────────────────────────────────────────────── + # Polls the registry for new archied/archie-agent images (pushed by + # .gitea/workflows/deploy.yml on merge to main) and restarts the + # containers that changed. Registry auth comes from the host's + # existing `docker login` config, mounted read-only. + watchtower: + image: nickfedor/watchtower + environment: + - DOCKER_CONFIG=/ + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ${HOME}/.docker/config.json:/config.json:ro + command: --interval 60 --cleanup archie-core-archied-1 archie-core-archied-winter-1 + restart: unless-stopped + volumes: nats_data: diff --git a/internal/webui/index.html b/internal/webui/index.html index 7b5235f43..d992dd41a 100644 --- a/internal/webui/index.html +++ b/internal/webui/index.html @@ -157,11 +157,11 @@ async function refresh() { .join("") || '