Skip to content

Commit 7f185d7

Browse files
committed
Initial commit
0 parents  commit 7f185d7

64 files changed

Lines changed: 7300 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJECT_SLUG=boxdev

.config/actionlint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# actionlint configuration for this project
2+
# References DocOps Lab base configuration
3+
4+
# Project-specific ignores (add as needed):
5+
ignore:
6+
# Example: Ignore specific workflow patterns
7+
# - 'workflow "deploy.yml"'
8+
# - '"ubuntu-20.04" is deprecated'
9+
10+
# Project-specific overrides:
11+
shellcheck:
12+
enable: true
13+
# shell-options: "-e SC2016" # Add project-specific ShellCheck exclusions

.config/docopsbox.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# DocOps Box — Docker Compose service definition
2+
# Edit .env to configure PROJECT_SLUG, image variant, Ruby version, etc.
3+
# For machine-local overrides, create .env.local (git-ignored).
4+
# See README.adoc for full documentation.
5+
6+
name: docops-${PROJECT_SLUG:-project}
7+
8+
services:
9+
docops:
10+
env_file:
11+
- .env
12+
- path: .env.local
13+
required: false
14+
image: ${IMAGE_REGISTRY:-docopslab}/box-${IMAGE_VARIANT:-max}:${IMAGE_TAG:-work}
15+
container_name: docopsbox_${PROJECT_SLUG:-project}
16+
environment:
17+
# Passed to entrypoint.sh for UID/GID reconciliation at container startup.
18+
# On Linux, dxbx sets these automatically from `id -u` / `id -g`.
19+
# On macOS with Docker Desktop, the VM provides transparent ownership mapping
20+
# and these can be left unset.
21+
HOST_UID: ${HOST_UID:-}
22+
HOST_GID: ${HOST_GID:-}
23+
RUN_USER: ${RUN_USER:-appuser}
24+
IMAGE_CONTEXT: ${IMAGE_CONTEXT:-work}
25+
DOCOPSBOX_IMAGE_ID: ${DOCOPSBOX_IMAGE_ID:-}
26+
DOCOPSBOX_IMAGE_DIGEST: ${DOCOPSBOX_IMAGE_DIGEST:-}
27+
volumes:
28+
# ..:/workspace because this compose file lives in .config/; .. resolves
29+
# to the project root which is what we want to mount as the workspace.
30+
# :z applies a shared SELinux label so Fedora/RHEL with SELinux enforcing
31+
# allows the bind mount. It is a no-op on macOS and Windows/Docker Desktop.
32+
- ..:/workspace:z
33+
- docops-shell-history:/commandhistory
34+
- docops-project-bundle:/usr/local/bundle
35+
# Per-project Node.js and Python dependency volumes. Named volumes keep
36+
# platform-native binaries (Linux builds) isolated from the host filesystem
37+
# and persistent across container restarts without polluting the workspace.
38+
- docops-project-node:/workspace/node_modules
39+
- docops-project-python:/opt/venv
40+
# Shared npm and pip download caches. Mounted at the fixed paths set by
41+
# npm_config_cache and PIP_CACHE_DIR in the image. Shared across all
42+
# projects so downloading a package once benefits all local projects.
43+
- docops-npm-cache:/npm-cache
44+
- docops-pip-cache:/pip-cache
45+
working_dir: /workspace
46+
# tty: true keeps the container alive when docker compose up runs without an
47+
# interactive terminal (e.g., VS Code Dev Containers). The Dev Containers
48+
# extension overrides this command, but tty: true is a defensive safeguard.
49+
tty: true
50+
command: zsh
51+
# Uncomment to forward local ports (e.g., Jekyll server):
52+
# ports:
53+
# - "4000:4000"
54+
labels:
55+
dxbx.managed: "true"
56+
dxbx.project_slug: ${PROJECT_SLUG:-project}
57+
58+
volumes:
59+
# Volumes are local only; they are not pushed/pulled with Git or Docker images.
60+
docops-shell-history: # Persists across resets.
61+
external: true # shared across projects, locally only
62+
name: docops-shell-history
63+
docops-project-bundle:
64+
name: docops-${PROJECT_SLUG:-project}-bundle
65+
docops-project-node:
66+
name: docops-${PROJECT_SLUG:-project}-node
67+
docops-project-python:
68+
name: docops-${PROJECT_SLUG:-project}-python
69+
docops-npm-cache:
70+
external: true # non-exclusive per project
71+
name: docops-npm-cache
72+
docops-pip-cache:
73+
external: true # non-exclusive per project
74+
name: docops-pip-cache

.config/docopslab-dev.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
source:
2+
repo: DocOps/lab
3+
ref: v1
4+
docs:
5+
- source: docs/agent/skills/*.md
6+
target: .agent/docs/skills/
7+
synced: true
8+
- source: docs/agent/topics/*.md
9+
target: .agent/docs/topics/
10+
synced: true
11+
- source: docs/agent/roles/*.md
12+
target: .agent/docs/roles/
13+
synced: true
14+
- source: docs/agent/missions/*.md
15+
target: .agent/docs/missions/
16+
synced: true
17+
18+
templates:
19+
manifest:
20+
- source: templates/AGENTS.markdown
21+
target: ./AGENTS.md
22+
- source: templates/gitignore
23+
target: .gitignore
24+
- source: templates/README.asciidoc
25+
target: README.adoc
26+
27+
tools:
28+
- tool: rubocop
29+
files:
30+
- source: rubocop/base.yml
31+
target: .config/.vendor/docopslab/rubocop.yml
32+
synced: true
33+
- source: rubocop/project.yml
34+
target: .config/rubocop.yml
35+
synced: false
36+
37+
- tool: vale
38+
files:
39+
- source: vale/base.ini
40+
target: .config/.vendor/docopslab/vale.ini
41+
synced: true
42+
- source: vale/project.ini
43+
target: .config/vale.local.ini
44+
synced: false
45+
paths:
46+
skip:
47+
- .agent/**/*
48+
- .bundle/**/*
49+
- .config/**/*
50+
- specs/tests/**/*
51+
exts: ['adoc']
52+
53+
54+
- tool: htmlproofer
55+
enabled: false # Disabled by default, enable per project
56+
files:
57+
- source: htmlproofer/base.yml
58+
target: .config/.vendor/docopslab/htmlproofer.yml
59+
synced: true
60+
- source: htmlproofer/project.yml
61+
target: .config/htmlproofer.yml
62+
synced: false
63+
paths:
64+
lint: docs/_site
65+
66+
- tool: shellcheck
67+
files:
68+
- source: shellcheck/base.shellcheckrc
69+
target: .config/shellcheckrc
70+
synced: true
71+
72+
- tool: actionlint
73+
files:
74+
- source: actionlint/base.yml
75+
target: .config/.vendor/docopslab/actionlint.yml
76+
synced: true
77+
- source: actionlint/project.yml
78+
target: .config/actionlint.yml
79+
synced: false
80+
81+
library:
82+
enabled: true
83+
source:
84+
repo: DocOps/lab
85+
ref: labdev-library

.config/rubocop.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# DocOps Lab RuboCop Configuration
2+
3+
inherit_from: .vendor/docopslab/rubocop.yml
4+
5+
# Add project-specific overrides below:
6+
# AllCops:
7+
# Exclude:
8+
# - scripts/**

.config/shellcheckrc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# ShellCheck configuration for DocOps Lab projects
2+
# This file is synced from docopslab-dev gem
3+
4+
# tag::core-rules[]
5+
# Set default shell to bash
6+
shell=bash
7+
8+
# Enforce documented style rules
9+
enable=require-double-brackets # Require [[ ]] over [ ] in Bash (SC3010)
10+
enable=deprecate-which # Use command -v instead of which (SC2230)
11+
enable=add-default-case # Require a fallthrough *) in case statements (SC2078)
12+
13+
# Quote safety
14+
enable=quote-safe-variables # Warn on unquoted variables that may word-split (SC2248)
15+
16+
# NOTE: SC2034 (variable appears unused) is NOT disabled globally.
17+
# In sourced library files that export variables for callers, suppress inline:
18+
# # shellcheck disable=SC2034 # exported; read by callers
19+
# end::core-rules[]
20+
21+
# tag::severity-notes[]
22+
# SEVERITY GAPS (not caught at --severity=warning):
23+
# SC2181 info "Check exit code directly with if; not via $?"
24+
# Idiomatic fix: `if ! mycmd; then` rather than `if [ $? -ne 0 ]`.
25+
# Promoting to warning requires changing --severity in the Rake task
26+
# (labdev:lint:bash), not in this file.
27+
#
28+
# STYLE ISSUES NOT COVERED BY SHELLCHECK (enforce via code review):
29+
# - Indentation: 2 spaces required; tabs not flagged by ShellCheck.
30+
# - `function` keyword: discouraged (use `name() {}` form); not flagged.
31+
# - $? anti-pattern: see SC2181 note above.
32+
# end::severity-notes[]

.config/vale.local.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# DocOps Lab Vale Configuration
2+
# Combined base and project configuration for consistent Vale linting
3+
4+
MinAlertLevel = warning
5+
StylesPath = .vendor/vale/styles

.devcontainer/devcontainer.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// This is the DocOps Box repo's own Dev Container config.
2+
// Prime template: templates/.devcontainer/devcontainer.json
3+
{
4+
"name": "DocOps Box",
5+
"dockerComposeFile": "../.config/docopsbox.yml",
6+
"service": "docops",
7+
"workspaceFolder": "/workspace",
8+
"remoteUser": "appuser",
9+
"postCreateCommand": "gem install bundler 2>/dev/null || true && ([ -f Gemfile ] && bundle install || true) && ([ -f package.json ] && npm install || true) && ([ -f requirements.txt ] && pip install -r requirements.txt || true)",
10+
"customizations": {
11+
"vscode": {
12+
"extensions": [
13+
"asciidoctor.asciidoctor-vscode",
14+
"eamodio.gitlens",
15+
"redhat.vscode-yaml"
16+
],
17+
"settings": {
18+
"terminal.integrated.defaultProfile.linux": "zsh",
19+
"asciidoc.pdf.engine": "asciidoctor-pdf"
20+
}
21+
}
22+
},
23+
"remoteEnv": {
24+
"HOST_UID": "${localEnv:HOST_UID}",
25+
"HOST_GID": "${localEnv:HOST_GID}",
26+
"RUN_USER": "appuser"
27+
},
28+
"shutdownAction": "stopCompose"
29+
}

.dockerignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# DocOps Box — Docker build context exclusions
2+
# Keeps the build context fast and prevents development files from leaking into
3+
# the image. Files intentionally included in the build (Gemfile*, package.json,
4+
# requirements.txt, dockerfile-*.sh) are expected in the project root (the
5+
# build context) and are NOT listed here. The repo's own copies live under
6+
# templates/ but users place them at their project root before building.
7+
8+
# Repo-only directories — not needed in user image builds
9+
templates/
10+
!templates/.zshrc
11+
bin/
12+
scripts/
13+
specs/
14+
15+
# Version control
16+
.git/
17+
.gitignore
18+
19+
# Agent/session scratch directories
20+
.agent/
21+
.agents/
22+
AGENTS.md
23+
24+
# Documentation source (not needed inside the image)
25+
*.adoc
26+
*.html
27+
LICENSE
28+
README.adoc
29+
30+
# Development tooling configs/manifests
31+
.config/
32+
Rakefile
33+
Gemfile*
34+
35+
# Editor and IDE
36+
.vscode/
37+
.idea/
38+
39+
# OS artifacts
40+
.DS_Store
41+
42+
# Runtime artifacts
43+
_site/
44+
.jekyll-cache/
45+
tmp/
46+
*.log
47+
*.bak
48+
*~

.githooks/pre-commit

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
# .githooks/pre-commit
3+
#
4+
# Runs the consistency check before every commit.
5+
# Activate once with: git config core.hooksPath .githooks
6+
set -euo pipefail
7+
8+
cd "$(git rev-parse --show-toplevel)"
9+
exec bundle exec ruby scripts/check-consistency.rb

0 commit comments

Comments
 (0)