From 80291c81141c8a1e04488a21a9d56b5c904ca1cd Mon Sep 17 00:00:00 2001 From: Eric Boehs Date: Tue, 26 Mar 2024 17:58:39 -0500 Subject: [PATCH] add base --- .devcontainer/base/devcontainer.json | 60 ++++++++++++++++++++++++++++ .devcontainer/base/post-create.sh | 12 ++++++ .devcontainer/base/post-start.sh | 1 + 3 files changed, 73 insertions(+) create mode 100644 .devcontainer/base/devcontainer.json create mode 100644 .devcontainer/base/post-create.sh create mode 100644 .devcontainer/base/post-start.sh diff --git a/.devcontainer/base/devcontainer.json b/.devcontainer/base/devcontainer.json new file mode 100644 index 00000000000..56e3ea5b7a9 --- /dev/null +++ b/.devcontainer/base/devcontainer.json @@ -0,0 +1,60 @@ +{ + "name": "base", + "image": "mcr.microsoft.com/devcontainers/base:bookworm", + + "features": { + "ghcr.io/devcontainers/features/sshd:1": { + "version": "latest" + }, + "ghcr.io/devcontainers-contrib/features/neovim-homebrew:1": { }, + "ghcr.io/devcontainers-contrib/features/tmux-homebrew:1": { } + }, + + "forwardPorts": [ + 3000, + 9293, + 5432, + 6379 + ], + "portsAttributes": { + "3000": { + "label": "vets-api", + "onAutoForward": "notify", + "requireLocalPort": true + }, + "9293": { + "label": "vets-api-healthcheck", + "onAutoForward": "silent", + "requireLocalPort": true + }, + "5432": { + "label": "postgres", + "onAutoForward": "silent", + "requireLocalPort": true + }, + "6379": { + "label": "redis", + "onAutoForward": "silent", + "requireLocalPort": true + } + }, + + "postCreateCommand": "sh .devcontainer/base/post-create.sh", + "postStartCommand": "sh .devcontainer/base/post-start.sh", + + "customizations": { + "codespaces": { + "repositories": { + "department-of-veterans-affairs/vets-api-mockdata": { + "permissions": { + "contents": "read", + "pull_requests": "write" + } + } + } + }, + "vscode": { + "extensions": ["ms-azuretools.vscode-docker", "Shopify.ruby-lsp"] + } + } +} diff --git a/.devcontainer/base/post-create.sh b/.devcontainer/base/post-create.sh new file mode 100644 index 00000000000..63cb633ff26 --- /dev/null +++ b/.devcontainer/base/post-create.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +cat <> $HOME/.tmux.conf +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'dreamsofcode-io/catppuccin-tmux' + +run '~/.tmux/plugins/tpm/tpm' + +if "test ! -d ~/.tmux/plugins/tpm" \ + "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" +EOT diff --git a/.devcontainer/base/post-start.sh b/.devcontainer/base/post-start.sh new file mode 100644 index 00000000000..1a2485251c3 --- /dev/null +++ b/.devcontainer/base/post-start.sh @@ -0,0 +1 @@ +#!/bin/sh