Skip to content

app-sync.yml playbook for restarts on source or env changes#588

Open
lawso017 wants to merge 1 commit intopgsty:mainfrom
lawso017:app-sync
Open

app-sync.yml playbook for restarts on source or env changes#588
lawso017 wants to merge 1 commit intopgsty:mainfrom
lawso017:app-sync

Conversation

@lawso017
Copy link
Contributor

While managing a supabase app server using the app.yml playbook, I was running into issues where changes in either the deployed source or environment variables didn't trigger a restart of the docker containers.

This app-sync.yml playbook provides restarts on changes with a slightly different approach:

1/ Use rsync to synchronize sources, with the caveat that we do not delete (since containers manage volumes) and we ignore timestamps (since volume timestamps change when containers run). This lets us track changes to deployed source.
2/ Calculate a hash of the .env file before and after it is modified to detect changes.

If 1 or 2 change, then docker compose will restart the containers (unless, of course, they were just started by app_launch).

I've only used this with supabase but wanted to pass it along if you thought the it would be generally useful.

@Vonng Vonng force-pushed the main branch 2 times, most recently from d351d04 to 9690822 Compare August 2, 2025 10:39
@Vonng Vonng force-pushed the main branch 8 times, most recently from c9639ad to c7da007 Compare January 7, 2026 05:26
@Vonng Vonng force-pushed the main branch 3 times, most recently from d91e420 to fa31213 Compare February 13, 2026 07:23
@Vonng Vonng force-pushed the main branch 13 times, most recently from 8100614 to e0a8f68 Compare February 27, 2026 06:15
@Vonng Vonng force-pushed the main branch 2 times, most recently from b197021 to fd4975a Compare February 28, 2026 03:09
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.

1 participant