Skip to content

enhance(docker): mount templates volume so page refresh uses changed template#145

Open
wesleyboar wants to merge 1 commit into
tapis-project:devfrom
wesleyboar:dx-mount-templates-volume
Open

enhance(docker): mount templates volume so page refresh uses changed template#145
wesleyboar wants to merge 1 commit into
tapis-project:devfrom
wesleyboar:dx-mount-templates-volume

Conversation

@wesleyboar

@wesleyboar wesleyboar commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Overview

When developing locally, template edits should be reflected on page after page refresh without needing to rebuild the image, so I mount the local ./service/templates directory into the authenticator container.

Warning

If the committed docker-compose.yml is used on production, then decline this PR. I can instead document this solution or offer it via a docker-compose.local.py.

Changes

  • added ./service/templates volume mount to authenticator service in docker-compose.yml

Testing

  1. Start up the app.
  2. Edit a file in service/templates/
  3. Refresh the browser/page.
  4. Changes appear without rebuilding image.

UI

Test.Docker.Volume.Mount.of.Templates.mov

@wesleyboar wesleyboar changed the title chore(docker): mount templates volume for live reload enhance(docker): mount templates volume for live reload Jun 24, 2026
Mounts ./service/templates into the authenticator container so templates
can be edited and refreshed without rebuilding the image.
@wesleyboar wesleyboar force-pushed the dx-mount-templates-volume branch from 90763cf to 0f66b07 Compare June 25, 2026 00:00
@wesleyboar wesleyboar changed the base branch from prod to dev June 30, 2026 20:13
@gcurbelo123

gcurbelo123 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

This alone didn't enable hot reload, I also had to add this at line 26 in models.py:
app.config['TEMPLATES_AUTO_RELOAD'] = True

@wesleyboar wesleyboar changed the title enhance(docker): mount templates volume for live reload enhance(docker): mount templates volume so refresh loads template change Jun 30, 2026
@wesleyboar

Copy link
Copy Markdown
Contributor Author

@gcurbelo123, true. I shouldn't have said "live reload". I've renamed the PR to instead describe accurately what it does. My intent was not automatic reload, but just to make page refresh result in latest template.

@wesleyboar wesleyboar changed the title enhance(docker): mount templates volume so refresh loads template change enhance(docker): mount templates volume so page refresh uses changed template Jun 30, 2026
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