Docker Deployment
Deploy the CoW Protocol Watch Tower using Docker.Overview
The preferred method of deployment is using Docker. The watch-tower is available as a Docker image on GitHub Container Registry.Available tags
The following Docker image tags are available:latest- the latest stable version of the watch-towervX.Y.Z- specific version releases (e.g.,v1.0.0)main- the latest version from themainbranchpr-<PR_NUMBER>- the latest version from a specific pull request
Running with Docker
To run the latest version of the watch-tower using Docker:Command breakdown
--rm- automatically remove the container when it exits-it- run in interactive mode with TTY-v- mount your local config file into the containerrun --config-path /config.json- command arguments passed to the watch-tower
Volume mounting
The watch-tower requires a configuration file to be mounted into the container. The Dockerfile defines a volume at/usr/src/app/database for persistent database storage.
To mount both config and database:
See the example
config.json.example in the repository for a sample configuration file with network settings.Building from source
To build the Docker image from source:- Use Node.js 22.2 Alpine as the base image
- Install dependencies with
yarn - Run linting and tests
- Build the application
- Set up the entrypoint at
dist/src/index.js