From 9f7796bbcc2e8910d97e47541dcb81d6a663f7ce Mon Sep 17 00:00:00 2001 From: Andrew Novoselac Date: Tue, 2 Apr 2024 11:30:06 -0400 Subject: [PATCH] Create a feature for installing postgres client dependencies --- features/postgres-client/README.md | 24 +++++++++++++++++++ .../postgres-client/devcontainer-feature.json | 6 +++++ features/postgres-client/install.sh | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 features/postgres-client/README.md create mode 100644 features/postgres-client/devcontainer-feature.json create mode 100755 features/postgres-client/install.sh diff --git a/features/postgres-client/README.md b/features/postgres-client/README.md new file mode 100644 index 0000000..f931d6a --- /dev/null +++ b/features/postgres-client/README.md @@ -0,0 +1,24 @@ +# Postgres Client + +Installs needed client-side dependencies for Rails apps using Postgres. + +NOTE: This feature does not install the dependencies needed for the Postgres server. For that we recommend running a +service using the official [Postgres docker image](https://hub.docker.com/_/postgres). + +## Example Usage + +```json +"features": { + "ghcr.io/rails/devcontainer/features/postgres-client": {} +} +``` + +## Options + +## Customizations + +## OS Support + +This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed. + +`bash` is required to execute the `install.sh` script. \ No newline at end of file diff --git a/features/postgres-client/devcontainer-feature.json b/features/postgres-client/devcontainer-feature.json new file mode 100644 index 0000000..7165f6a --- /dev/null +++ b/features/postgres-client/devcontainer-feature.json @@ -0,0 +1,6 @@ +{ + "id": "postgres-client", + "version": "0.1.0", + "name": "Postgres Client", + "description": "Installs needed client-side dependencies for Rails apps using Postgres" +} diff --git a/features/postgres-client/install.sh b/features/postgres-client/install.sh new file mode 100755 index 0000000..bb0c5b7 --- /dev/null +++ b/features/postgres-client/install.sh @@ -0,0 +1,3 @@ +apt-get update -y && apt-get -y install --no-install-recommends libpq-dev + +rm -rf /var/lib/apt/lists/*