55 Commits

Author SHA1 Message Date
Bas Nijholt
32dc6b3665 Skip empty lines in streaming output v0.8.0 2025-12-13 23:50:35 -08:00
Bas Nijholt
7d98e664e9 Auto-detect local IPs to skip SSH when on target host 2025-12-13 23:48:28 -08:00
Bas Nijholt
6763403700 Fix duplicate prefix before traefik config message v0.7.1 2025-12-13 23:46:41 -08:00
Bas Nijholt
feb0e13bfd Add check command to find missing services v0.7.0 2025-12-13 23:43:47 -08:00
Bas Nijholt
b86f6d190f Add Rich styling to CLI output
- Service names in cyan, host names in magenta
- Success checkmarks, warning/error symbols
- Colored sync diff indicators (+/-/~)
- Unicode arrows for migrations
v0.6.0
2025-12-13 23:40:07 -08:00
Bas Nijholt
5ed15b5445 docs: Add Docker Swarm overlay network notes v0.5.0 2025-12-13 23:16:09 -08:00
Bas Nijholt
761b6dd2d1 Rename state file to compose-farm-state.yaml (not hidden) 2025-12-13 23:01:40 -08:00
Bas Nijholt
e86c2b6d47 docs: Simplify Traefik port requirement note 2025-12-13 22:59:50 -08:00
basnijholt
9353b74c35 chore(docs): update TOC 2025-12-14 06:58:15 +00:00
Bas Nijholt
b7e8e0f3a9 docs: Add limitations and best practices section
Documents cross-host networking limitations:
- Docker DNS doesn't work across hosts
- Dependent services should stay in same compose file
- Ports must be published for cross-host communication
2025-12-13 22:58:01 -08:00
Bas Nijholt
b6c02587bc Rename traefik_host to traefik_service
Instead of specifying the host directly, specify the service name
that runs Traefik. The host is then looked up from the services
mapping, avoiding redundancy.
2025-12-13 22:43:33 -08:00
Bas Nijholt
d412c42ca4 Store state file alongside config file
State is now stored at .compose-farm-state.yaml in the same
directory as the config file. This allows multiple compose-farm
setups with independent state.

State functions now require a Config parameter to locate the
state file via config.get_state_path().
2025-12-13 22:38:11 -08:00
Bas Nijholt
13e0adbbb9 Add traefik_host config to skip local services
When traefik_host is set, services on that host are skipped in
file-provider generation since Traefik's docker provider handles
them directly. This allows running compose-farm from any host
while still generating correct file-provider config.
2025-12-13 22:34:20 -08:00
Bas Nijholt
68c41eb37c Improve missing ports warning message
Replace technical "L3 reachability" phrasing with actionable
guidance: "Add a ports: mapping for cross-host routing."
2025-12-13 22:29:20 -08:00
Bas Nijholt
8af088bb5d Add traefik_file config for auto-regeneration
When traefik_file is set in config, compose-farm automatically
regenerates the Traefik file-provider config after up, down,
restart, and update commands. Eliminates the need to manually
run traefik-file after service changes.
2025-12-13 22:24:29 -08:00
Bas Nijholt
1308eeca12 fix: Skip local services in traefik-file generation
Local services (localhost, local, 127.0.0.1) are handled by Traefik's
docker provider directly. Generating file-provider entries for them
creates conflicting routes with broken localhost URLs (since Traefik
runs in a container where localhost is isolated).

Now traefik-file only generates config for remote services.
2025-12-13 19:51:57 -08:00
Bas Nijholt
a66a68f395 docs: Clarify no merge commits to main rule 2025-12-13 19:44:30 -08:00
Bas Nijholt
6ea25c862e docs: Add traefik directory merging instructions 2025-12-13 19:41:16 -08:00
Bas Nijholt
280524b546 docs: Use GitHub admonition for TL;DR 2025-12-13 19:34:31 -08:00
Bas Nijholt
db9360771b docs: Shorten TL;DR 2025-12-13 19:33:28 -08:00
Bas Nijholt
c7590ed0b7 docs: Move TOC below TL;DR 2025-12-13 19:32:41 -08:00
Bas Nijholt
bb563b9d4b docs: Add TL;DR to README 2025-12-13 19:31:05 -08:00
Bas Nijholt
fe160ee116 fix: Move traefik import to top-level 2025-12-13 17:07:29 -08:00
Bas Nijholt
4c7f49414f docs: Update README for sync command and auto-migration
- Replace snapshot with sync command
- Add auto-migration documentation
- Update compose file naming convention
2025-12-13 16:55:07 -08:00
Bas Nijholt
bebe5b34ba Merge snapshot into sync command
The sync command now performs both operations:
- Discovers running services and updates state.yaml
- Captures image digests and updates dockerfarm-log.toml

Removes the standalone snapshot command to keep the API simple.
v0.4.0
2025-12-13 16:53:49 -08:00
Bas Nijholt
5d21e64781 Add sync command to discover running services and update state
The sync command queries all hosts to find where services are actually
running and updates the state file to match reality. Supports --dry-run
to preview changes without modifying state. Useful for initial setup
or after manual changes.
v0.3.0
2025-12-13 15:58:29 -08:00
Bas Nijholt
114c7b6eb6 Add check_service_running for discovering running services
Adds a helper function to check if a service has running containers
on a specific host by executing `docker compose ps --status running -q`.
2025-12-13 15:58:29 -08:00
Bas Nijholt
20e281a23e Add tests for state module
Tests cover load, save, get, set, and remove operations
for service deployment state tracking.
2025-12-13 15:58:29 -08:00
Bas Nijholt
ec33d28d6c Add auto-migration support to up/down commands
- up: Detects if service is deployed on a different host and
  automatically runs down on the old host before up on the new
- down: Removes service from state tracking after successful stop
- Enables seamless service migration by just changing the config
2025-12-13 15:58:29 -08:00
Bas Nijholt
a818b7726e Add run_compose_on_host for cross-host operations
Allows running compose commands on a specific host rather than
the configured host for a service. Used for migration when
stopping a service on the old host before starting on the new.
2025-12-13 15:58:29 -08:00
Bas Nijholt
cead3904bf Add state module for tracking deployed services
Tracks which host each service is deployed on in
~/.config/compose-farm/state.yaml. This enables automatic
migration when a service's host assignment changes.
2025-12-13 15:58:29 -08:00
Bas Nijholt
8f5e14d621 Fix pre-commit issues 2025-12-13 14:54:28 -08:00
Bas Nijholt
ea220058ec Support multiple compose filename conventions
Try compose.yaml, compose.yml, docker-compose.yml, and
docker-compose.yaml when locating compose files for a service.
v0.2.0
2025-12-13 14:52:43 -08:00
basnijholt
b5773a3f7f chore(docs): update TOC v0.1.0 2025-12-13 22:43:47 +00:00
Bas Nijholt
37300b4a8d Add .DS_Store to gitignore 2025-12-13 14:43:18 -08:00
Bas Nijholt
501c69184e Add --version/-v flag to CLI 2025-12-13 14:43:12 -08:00
Bas Nijholt
8cff744c08 Add hatch-vcs for automatic version management
Version is now derived from git tags instead of hardcoded.
2025-12-13 14:42:37 -08:00
Bas Nijholt
6133174f94 Add more workflows 2025-12-13 14:39:37 -08:00
Bas Nijholt
1f34fb844d Refactor Traefik generator for clarity 2025-12-13 10:04:15 -08:00
Bas Nijholt
7d0f829895 Add Traefik file-provider generator and docs 2025-12-13 09:51:43 -08:00
Bas Nijholt
d432667584 docs(CLAUDE.md): rename Development Notes to Communication Notes in CLAUDE.md 2025-12-11 11:27:22 -08:00
Bas Nijholt
0f2499038d Organization improvements (#2) 2025-12-11 11:25:23 -08:00
Bas Nijholt
896a096ced Merge pull request #1 from basnijholt/feature/dockerfarm-snapshot-log
feature/dockerfarm snapshot log
2025-12-11 10:52:30 -08:00
Bas Nijholt
9ce930b6e3 Add .envrc 2025-12-11 10:48:53 -08:00
Bas Nijholt
8998e10179 Add snapshot command to log compose image digests 2025-12-11 10:28:25 -08:00
Bas Nijholt
f4973f7cc3 refactor(docs): add AGENTS.md and GEMINI.md symlinks to CLAUDE.md 2025-12-11 10:23:29 -08:00
Bas Nijholt
aaaf0b9323 Improve README: clarify shared storage assumption 2025-12-11 10:05:20 -08:00
Bas Nijholt
a1b16d988d Add GitHub Actions CI workflow 2025-12-11 10:03:00 -08:00
Bas Nijholt
68aab82ef9 Rename project from sdc to compose-farm
- Package: sdc → compose_farm
- CLI command: sdc → compose-farm
- Config file: sdc.yaml → compose-farm.yaml
- Config path: ~/.config/sdc/ → ~/.config/compose-farm/
- Updated all documentation, tests, and examples
2025-12-11 09:54:03 -08:00
Bas Nijholt
6feb2bbad9 Add examples/sdc.yaml config file 2025-12-11 09:30:33 -08:00