-
Notifications
You must be signed in to change notification settings - Fork 212
Unified Devcontainer Configuration for Local and Codespaces Development #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for nextflow-training ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I tried it on codespaces and it works. Well done 🚀 |
The description is longer than the code changes 👌 |
AI dun that too |
I tested locally and it works too apparently (not sure if I did it right). |
Thanks @maxulysse @ewels |
Description:
This pull request updates the
devcontainer.json
configuration to ensure seamless development across both local VS Code with the Dev Containers extension and GitHub Codespaces. The primary change addresses the handling of theHOST_PROJECT_PATH
environment variable, which previously relied onlocalWorkspaceFolder
(specific to local setups).Changes:
remoteEnv.HOST_PROJECT_PATH
:${localWorkspaceFolder}
with/workspaces/training
.HOST_PROJECT_PATH
environment variable consistently points to the correct workspace location in both local and Codespaces environments.Why this works in both environments:
workspaceFolder
:workspaceFolder
is maintained as/workspaces/training
, providing a consistent starting point for VS Code in both local and cloud setups.remoteEnv
:/workspaces
, making/workspaces/training
the correct path.workspaceMount
line binds the local folder to/workspaces/training
, ensuring that/workspaces/training
also points to the local project.HOST_PROJECT_PATH
to/workspaces/training
, we achieve cross-environment compatibility.postCreateCommand
line has been added for debugging purposes. It will output "Local Development" or "Codespaces Development" to the terminal, depending on the environment.This unified configuration streamlines the development process by eliminating the need for environment-specific adjustments, allowing developers to switch seamlessly between local and cloud-based development environments.