Skip to content

Feature sync from docker compose#138

Merged
bomoko merged 12 commits intomainfrom
feature-sync-from-docker-compose
Feb 23, 2026
Merged

Feature sync from docker compose#138
bomoko merged 12 commits intomainfrom
feature-sync-from-docker-compose

Conversation

@bomoko
Copy link
Copy Markdown
Collaborator

@bomoko bomoko commented Feb 12, 2026

This PR introduces a new way of running a sync. Essentially, it uses the same underlying structure, but it kicks it off in a new way. None of the primary sync logic itself is touched here, it's just how we set it up.

There are several things to pay attention to here - I'll first give a high level overview of the changes in each of the files

  • sync.go - here I've factored out big chunks of functionality that is to be shared between the old sync command and the new service-sync command in serviceSync.go
  • syncSharedFuncs.go is where the new shared functions exist
  • serviceSync.go is the new command. We will speak about this in more detail below
  • synchers/syncersFromServiceDefs.go is the set of functions that take in a Service type (basically something that describes a lagoon service read out of our docker-compose files) and converts it to a Syncer object type (which tells us stuff like, what commands to run, defaults, etc.) - these functions are all just setup.
  • syncersFromDockerfile.go will load up and convert a docker compose file into a map of Service structs. In the very near future, a similar function will be introduced that can pull these data from the services API.

Okay - so what do you need to know about running this?

the new command that's registered is the service-sync command. This has several features

  • you can run it "raw" and it'll read a docker-compose file and try extract service details - you can use these details to then run a sync on a particular resource or volume.
  • Unlike the existing file sync, it supports multiple volumes
  • It lets you do an an --all-services version of the sync which is great when you run it in no-interaction mode - this will sync all volumes and services

@bomoko bomoko marked this pull request as draft February 12, 2026 21:09
@bomoko bomoko marked this pull request as ready for review February 15, 2026 23:01
@bomoko bomoko requested a review from CGoodwin90 February 15, 2026 23:01
Copy link
Copy Markdown
Contributor

@CGoodwin90 CGoodwin90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as expected locally, just noted a couple minor issues.

Comment thread synchers/syncersFromServiceDefs.go Outdated
Comment thread cmd/serviceSync.go Outdated
@bomoko bomoko requested a review from CGoodwin90 February 23, 2026 03:21
@bomoko bomoko merged commit f1ac14d into main Feb 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants