The README now covers what keepalive is, a quick start, the adapter table, and links. Reference material moves to docs/: configuration (every option, per-adapter keys, validation), deployment (Compose, Coolify, Docker, source), how it works (writes, retries, timeouts, logging), known issues (PostgreSQL public-schema permissions and Aiven's ACL key-pattern tilde, by log line), and adding an adapter (now including ConfigKeys registration). .gitignore also excludes config.yaml, matching .dockerignore.
2.1 KiB
Deployment
keepalive is a background worker: it opens no port, serves no HTTP, and needs only outbound network access to your datastores. Every option lives in the config file.
The image is built from the repository's Dockerfile: a static CGO_ENABLED=0 binary on gcr.io/distroless/static-debian12:nonroot, running as user 65532.
Docker Compose
cp config.example.yml config.yml # then edit it
docker compose up -d --build
docker compose logs -f
compose.yml mounts ./config.yml read-only at /config.yml and restarts the container unless you stop it.
Before the first start:
- Create
config.ymlfirst. If it is missing, Docker mounts an empty directory in its place and keepalive exits with/config.yml is a directory, not a config file. - Make it readable by user
65532. A file with mode0600owned by your user cannot be read inside the container;0644works.
After editing config.yml, restart the service (docker compose restart); keepalive reads its config only at startup.
Coolify
- Create an application from the repository with the Docker Compose build pack and compose file
/compose.yml. - Coolify turns the
./config.ymlbind mount into an editable file storage. Paste your config there. - Leave the service without a domain; keepalive has no port and no healthcheck.
- Deploy, then restart after any config change.
Docker
docker build -t keepalive:local .
docker run -d --name keepalive --restart unless-stopped \
-v "$PWD/config.yml:/config.yml:ro" \
keepalive:local
To mount the config into a working directory instead of the container root:
docker run -d --name keepalive --restart unless-stopped \
--workdir /workspace \
-v "$PWD/config.yml:/workspace/config.yml:ro" \
keepalive:local
From source
Requires Go 1.26 or later.
git clone https://github.com/tiennm99/keepalive
cd keepalive
cp config.example.yml config.yml # then edit it
go run .
Stopping
On SIGTERM or SIGINT, keepalive stops every service and exits within 7 seconds, inside Docker's default 10-second stop grace period.