https://github.com/ccao-data/service-watchtower
Service to monitor the CCAO registry and automatically pull new Docker images
https://github.com/ccao-data/service-watchtower
config docker service
Last synced: 12 days ago
JSON representation
Service to monitor the CCAO registry and automatically pull new Docker images
- Host: GitHub
- URL: https://github.com/ccao-data/service-watchtower
- Owner: ccao-data
- Created: 2023-07-05T02:57:47.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-28T18:00:59.000Z (almost 3 years ago)
- Last Synced: 2026-01-21T22:37:03.123Z (5 months ago)
- Topics: config, docker, service
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Watchtower
This service runs on CCAO's Shiny server/Ubuntu VM and is responsible for keeping CCAO applications and services up-to-date. It utilizes a small application called [Watchtower](https://containrrr.dev/watchtower/) to scan the [CCAO container registry](https://github.com/orgs/ccao-data/packages) at a set interval and automatically pull new Docker images.
The service will only scan/update images with the Docker label `com.centurylinklabs.watchtower.enable=true`. This label must be added manually when creating CCAO applications and services. Once an image is updated, any new instances will use the updated version. To force a new session/app update, relaunch the application or service using `docker-compose`.
## Usage
To start this service, first connect to the Shiny server [via SSH](https://support.rackspace.com/how-to/connecting-to-a-server-using-ssh-on-linux-or-mac-os/) (ask IT for login details). Next, go to the folder containing this repository (usually `~/services/service-watchtower`) or clone the repo if it doesn't exist locally. Finally, start the service using [Docker Compose](https://docs.docker.com/compose/gettingstarted/) by typing `docker-compose up -d` while in the same folder as `docker-compose.yml`.
This service requires Docker login details in order to scan the CCAO's private container registry. These details are passed to the service by placing a file, `config.json`, within a subdirectory of the main repository folder called `secrets`. The directory structure should be:
```
service_watchtower
├── docker-compose.yaml
└── secrets
└── config.json
```
The `config.json` file is generated using [`docker login`](https://docs.docker.com/engine/reference/commandline/login/) and saved to `~/.docker/config.json` by default. Be sure to copy the file into `secrets` before launching the service with `docker-compose up -d`.