docs(setup): add Debian 13 dev-VM setup procedure + scripts + devcontainer
CI / commits (pull_request) Successful in 2m52s
CI / check (pull_request) Successful in 3m3s
CI / scan (pull_request) Successful in 3m11s
CI / a11y (pull_request) Successful in 3m5s
Docs site / build (pull_request) Successful in 3m10s
CI / perf (pull_request) Successful in 6m53s
CI / commits (pull_request) Successful in 2m52s
CI / check (pull_request) Successful in 3m3s
CI / scan (pull_request) Successful in 3m11s
CI / a11y (pull_request) Successful in 3m5s
Docs site / build (pull_request) Successful in 3m10s
CI / perf (pull_request) Successful in 6m53s
New procedure in docs/setup/01-dev-debian-vm-setup.md targeting the new dev VM (10.100.201.21, Debian 13) that replaces the WSL workflow. The existing setup files are renumbered (01->02, 02->03, 03->04) to free prefix 01 for the default flow. 10 modular idempotent scripts under docs/setup/scripts/ install the stack: zsh + Oh My Zsh + Powerlevel10k + plugins, modern CLI tooling (bat, eza, fd-find, ripgrep, fzf, zoxide, ncdu, keychain + dev extras), nvm + Node from .nvmrc + corepack + pnpm, Docker CE + compose plugin, inotify watches + swap + hostname tuning, best-effort UFW + sshd hardening that probes-before-applying, and notes/aliases.zsh + notes/gitconfig.txt installation. A systemd template (apf-portal-infra@.service) auto-starts the local dev infra stack at boot per user. .devcontainer/ ships a VSCode Dev Container spec pinning Node 24 and attaching to the host's apf-portal-dev Compose network so postgres / redis / otel resolve by DNS from inside the container. initializeCommand fails fast if the infra hasn't been brought up yet. CLAUDE.md Environment conventions documents the two envs (local + development) plus the hybrid sub-mode (workstation IDE + VM infra via SSH LocalForward) and the two IDE flows (Remote-SSH + Devcontainer). Adjacent follow-ups (not in this PR): preview infra on the GitLab VM (10.100.201.10), GitLab Runner migration alongside the Gitea -> GitLab cutover, private dotfiles repo.
This commit is contained in:
Executable
+58
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env bash
|
||||
# Docker CE + compose plugin from the docker.com apt repo. Adds the
|
||||
# current user to the `docker` group and enables the daemon at boot.
|
||||
set -euo pipefail
|
||||
# shellcheck source=./lib.sh
|
||||
source "$(cd "$(dirname "$0")" && pwd)/lib.sh"
|
||||
require_debian
|
||||
require_not_root
|
||||
|
||||
if command -v docker >/dev/null 2>&1 \
|
||||
&& docker compose version >/dev/null 2>&1; then
|
||||
skip "docker + compose plugin already present."
|
||||
else
|
||||
log "Installing Docker CE from docker.com apt repo."
|
||||
|
||||
# GPG key.
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
if [[ ! -f /etc/apt/keyrings/docker.asc ]]; then
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg \
|
||||
| sudo tee /etc/apt/keyrings/docker.asc >/dev/null
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||
fi
|
||||
|
||||
# Repo definition.
|
||||
ARCH="$(dpkg --print-architecture)"
|
||||
# shellcheck disable=SC1091
|
||||
CODENAME="$(. /etc/os-release && echo "${VERSION_CODENAME}")"
|
||||
REPO_LINE="deb [arch=${ARCH} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian ${CODENAME} stable"
|
||||
|
||||
if [[ -f /etc/apt/sources.list.d/docker.list ]] \
|
||||
&& grep -qxF "$REPO_LINE" /etc/apt/sources.list.d/docker.list; then
|
||||
skip "docker.list already configured for $CODENAME."
|
||||
else
|
||||
echo "$REPO_LINE" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
|
||||
ok "Wrote /etc/apt/sources.list.d/docker.list."
|
||||
fi
|
||||
|
||||
sudo apt-get update -qq
|
||||
apt_install docker-ce docker-ce-cli containerd.io \
|
||||
docker-buildx-plugin docker-compose-plugin
|
||||
ok "Docker installed."
|
||||
fi
|
||||
|
||||
# Add user to docker group.
|
||||
if id -nG "$USER" | grep -qw docker; then
|
||||
skip "User $USER already in docker group."
|
||||
else
|
||||
sudo usermod -aG docker "$USER"
|
||||
warn "Added $USER to docker group — log out and back in for it to apply."
|
||||
fi
|
||||
|
||||
# Enable docker.service at boot.
|
||||
if systemctl is-enabled docker.service >/dev/null 2>&1; then
|
||||
skip "docker.service already enabled at boot."
|
||||
else
|
||||
sudo systemctl enable --now docker.service
|
||||
ok "docker.service enabled and started."
|
||||
fi
|
||||
Reference in New Issue
Block a user