When using the ckolkman.vscode-postgres extension in GitHub Codespaces or dev containers, currently we have to manually add connection details (host, username, password, etc.) each time. This is time-consuming and repetitive, especially for projects with an "it-just-works" or "one-click-dev-setup" goal.
Request
Automate the PostgreSQL connection setup during the container build process in one of the following ways:
via environment variables or configuration files (e.g., .devcontainer/devcontainer.json, .vscode/settings.json).
or injecting connection details using code or .sh script instead of manually entering them through the VSCode GUI.
The goal is to automate this manual entry process.
I understand that saving the credentials in settings.json is not secure and is a bad practice.
But using devcontainer.json or setup.sh script to take the credentials from an .env file or process.env and inject them to auto add a new postgres connection would follow the best practices and would be a great and very useful feature!
Relevant Discussions
There are already ongoing discussions and feature requests from the community for similar use cases. Here are some relevant threads:
This feature would save time, simplify developer workflows and enhance the experience, especially in environments like Dev Containers or GitHub Codespaces, where setting up database connections manually is inefficient.
Addressing this request can close multiple existing open issues and handle many use cases mentioned in the same.
Issue
When using the
ckolkman.vscode-postgres
extension in GitHub Codespaces or dev containers, currently we have to manually add connection details (host, username, password, etc.) each time. This is time-consuming and repetitive, especially for projects with an "it-just-works" or "one-click-dev-setup" goal.Request
Automate the PostgreSQL connection setup during the container build process in one of the following ways:
.devcontainer/devcontainer.json
,.vscode/settings.json
)..sh
script instead of manually entering them through the VSCode GUI.The goal is to automate this manual entry process.
I understand that saving the credentials in
settings.json
is not secure and is a bad practice. But usingdevcontainer.json
orsetup.sh
script to take the credentials from an.env
file orprocess.env
and inject them to auto add a new postgres connection would follow the best practices and would be a great and very useful feature!Relevant Discussions
There are already ongoing discussions and feature requests from the community for similar use cases. Here are some relevant threads:
Conclusion:
This feature would save time, simplify developer workflows and enhance the experience, especially in environments like Dev Containers or GitHub Codespaces, where setting up database connections manually is inefficient.
Addressing this request can close multiple existing open issues and handle many use cases mentioned in the same.