DEV: Overhaul devcontainer configuration (#28446)

- Uses a more appropriate image, with immutable tag (so update prompts work correctly)
- Updates port forwarding
- Improves mount setup (inc. persistant PG/Redis when rebuilding)
- Fixes ember-cli live reload
- Automatically configures VSCode & extensions
This commit is contained in:
David Taylor
2024-11-14 12:11:38 +00:00
committed by GitHub
parent 8dc772f2a8
commit fd5ef6896d
7 changed files with 108 additions and 18 deletions

View File

@ -95,10 +95,11 @@ function updateScriptReferences({
);
}
// We use _lr/livereload.js directly instead of ember-cli-live-reload so that the protocol/port is configured automatically
// ember-cli-live-reload doesn't select ports correctly, so we use _lr/livereload directly
// (important for cloud development environments like GitHub CodeSpaces)
newElements.unshift(
`<script async src="/_lr/livereload.js?path=_lr/livereload" nonce="${nonce}"></script>`
`<script nonce="${nonce}">window.LiveReloadOptions = { "path": "_lr/livereload", "host": location.host, "port": location.port || (location.protocol === "https:" ? 443 : 80) }</script>`,
`<script async src="/_lr/livereload.js" nonce="${nonce}"></script>`
);
}