Sign inSign up

mukovoz/xtdiff

By mukovoz

•Updated about 1 hour ago

Image
0

61

mukovoz/xtdiff repository overview

⁠xtdiff

xtdiff keeps the state of your catalog in each system it syncs with, in branches such as modern_retail and shopify. It tells you exactly what one branch needs in order to match another: records to create, update (field by field) and delete. It handles millions of records.

It comes with a REST API with live updates over websockets, an admin panel, and xtdiffctl, a command-line client.

Source and documentation: https://github.com/mukovoz/xtdiff⁠

⁠Quick start

docker run -d --name xtdiff --restart unless-stopped \
  -p 8080:8080 \
  -v xtdiff-data:/var/lib/xtdiff \
  mukovoz/xtdiff:0.1.0

Then open http://localhost:8080/admin/⁠.

⁠Docker Compose

name: xtdiff

services:
  xtdiff:
    image: mukovoz/xtdiff:0.1.0
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - xtdiff-data:/var/lib/xtdiff
      # - ./config.toml:/etc/xtdiff/config.toml:ro
    stop_grace_period: 60s

volumes:
  xtdiff-data:

For a setup behind nginx under a sub-path like /xtdiff, see compose.proxy.yml⁠ and the Docker guide⁠.

⁠The image

Tagsthe release version (0.1.0) and latest; pin a version in production
Platformslinux/amd64, linux/arm64
Port8080: admin panel at /admin/, API at /api/, live updates at /ws
Data/var/lib/xtdiff. Keep it on a volume.
Config/etc/xtdiff/config.toml; mount your own over it (all settings⁠)
Userxtdiff (uid 100, gid 101), not root
Health check/api/health
StopSIGTERM; open requests finish and the database closes cleanly

⁠Using it

docker exec xtdiff xtdiffctl stats                    # server status
docker exec xtdiff xtdiffctl repos                    # repositories
docker exec xtdiff xtdiffctl diff -r catalog \
  -s modern_retail -t shopify --type update           # what shopify needs

Or call the API directly:

curl 'http://localhost:8080/api/repositories/catalog/diff?source=modern_retail&target=shopify&type=create'

⁠More

Tag summary

Content type

Image

Digest

sha256:403adf7db…

Size

13 MB

Last updated

about 1 hour ago

docker pull mukovoz/xtdiff