Skip to content

Re-render app docker-compose templates on startup#49

Merged
max-tet merged 1 commit intomainfrom
re-render-app-templates-on-startup
Apr 7, 2026
Merged

Re-render app docker-compose templates on startup#49
max-tet merged 1 commit intomainfrom
re-render-app-templates-on-startup

Conversation

@max-tet
Copy link
Copy Markdown
Member

@max-tet max-tet commented Apr 7, 2026

Summary

  • Re-renders all installed app docker-compose.yml files from their .template files on every shard_core startup
  • Ensures app configs always reflect the current shard identity (domain, paths) after core updates
  • Discovered during portal-to-freeshard migration: apps like Vaultwarden kept the old p.getportal.org domain in their rendered docker-compose, causing auth failures

Details

After a core update that changes the DNS zone (e.g. p.getportal.orgfreeshard.cloud), the core containers pick up the new domain via .env, but installed apps retain their previously rendered docker-compose.yml with stale template values. This adds a startup step that re-renders all templates using the current identity, making it a no-op when nothing changed.

Test plan

  • Deploy updated shard_core to a migrated shard and verify apps get the new domain in their docker-compose.yml
  • Verify startup logs show "re-rendered docker-compose files for N apps"
  • Verify apps without a .template file (if any) are skipped gracefully

🤖 Generated with Claude Code

After a core update, settings like the DNS zone may change, but installed
apps keep their previously rendered docker-compose.yml with stale values
(e.g. old domain in Vaultwarden's DOMAIN env var). This re-renders all
app templates from their existing .template files on every startup,
ensuring they always reflect the current shard identity and paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@max-tet max-tet merged commit 8d10aa7 into main Apr 7, 2026
8 of 9 checks passed
@max-tet max-tet deleted the re-render-app-templates-on-startup branch April 7, 2026 08:39
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