Skip to content

Commit 7fc09aa

Browse files
committed
Initial commit
0 parents  commit 7fc09aa

63 files changed

Lines changed: 7462 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: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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 (gitignored).
4+
# See README.adoc for full documentation.
5+
6+
# dxbx CLI settings. These control how dxbx behaves in this project.
7+
# All keys are optional; the values below are the built-in defaults.
8+
x-docopsbox:
9+
dxbx:
10+
show_commands: true # print the docker/compose command before running it
11+
show_warnings: true # print non-fatal warnings (e.g. volume, config notices)
12+
13+
14+
services:
15+
docops:
16+
env_file:
17+
- .env
18+
- path: .env.local
19+
required: false
20+
# build:
21+
# # context: .. because this compose file lives in .config/; .. resolves to
22+
# # the project root where the Dockerfile lives.
23+
# context: ..
24+
# dockerfile: Dockerfile
25+
# args:
26+
# RUBY_VERSION: ${RUBY_VERSION:-3.3}
27+
# IMAGE_CONTEXT: ${IMAGE_CONTEXT:-work}
28+
# ADD_NODEJS: ${ADD_NODEJS:-true}
29+
# ADD_PYTHON: ${ADD_PYTHON:-true}
30+
# ADD_PANDOC: ${ADD_PANDOC:-true}
31+
# ADD_VALE: ${ADD_VALE:-true}
32+
# ADD_LIBREOFFICE: ${ADD_LIBREOFFICE:-false}
33+
# HOST_UID: ${HOST_UID:-1000}
34+
# HOST_GID: ${HOST_GID:-1000}
35+
image: ${IMAGE_REGISTRY:-docopslab}/box-${IMAGE_VARIANT:-max}:${IMAGE_CONTEXT:-work}
36+
container_name: docopsbox_${PROJECT_SLUG:-project}
37+
environment:
38+
# Passed to entrypoint.sh for UID/GID reconciliation at container startup.
39+
# On Linux, dxbx sets these automatically from `id -u` / `id -g`.
40+
# On macOS with Docker Desktop, the VM provides transparent ownership mapping
41+
# and these can be left unset.
42+
HOST_UID: ${HOST_UID:-}
43+
HOST_GID: ${HOST_GID:-}
44+
RUN_USER: ${RUN_USER:-appuser}
45+
IMAGE_CONTEXT: ${IMAGE_CONTEXT:-work}
46+
DOCOPSBOX_IMAGE_ID: ${DOCOPSBOX_IMAGE_ID:-}
47+
DOCOPSBOX_IMAGE_DIGEST: ${DOCOPSBOX_IMAGE_DIGEST:-}
48+
volumes:
49+
# ..:/workspace because this compose file lives in .config/; .. resolves
50+
# to the project root which is what we want to mount as the workspace.
51+
# :z applies a shared SELinux label so Fedora/RHEL with SELinux enforcing
52+
# allows the bind mount. It is a no-op on macOS and Windows/Docker Desktop.
53+
- ..:/workspace:z
54+
- docops-shell-history:/commandhistory
55+
- docops-project-bundle:/usr/local/bundle
56+
# Per-project Node.js and Python dependency volumes. Named volumes keep
57+
# platform-native binaries (Linux builds) isolated from the host filesystem
58+
# and persistent across container restarts without polluting the workspace.
59+
- docops-project-node:/workspace/node_modules
60+
- docops-project-python:/opt/venv
61+
# Shared npm and pip download caches. Mounted at the fixed paths set by
62+
# npm_config_cache and PIP_CACHE_DIR in the image. Shared across all
63+
# projects so downloading a package once benefits all local projects.
64+
- docops-npm-cache:/npm-cache
65+
- docops-pip-cache:/pip-cache
66+
working_dir: /workspace
67+
# tty: true keeps the container alive when docker compose up runs without an
68+
# interactive terminal (e.g., VS Code Dev Containers). The Dev Containers
69+
# extension overrides this command, but tty: true is a defensive safeguard.
70+
tty: true
71+
command: zsh
72+
# Uncomment to forward local ports (e.g., Jekyll server):
73+
# ports:
74+
# - "4000:4000"
75+
labels:
76+
dxbx.managed: "true"
77+
dxbx.project_slug: ${PROJECT_SLUG:-project}
78+
79+
volumes:
80+
docops-shell-history:
81+
# Precious: persists across resets. Only removed by `dxbx reset --full`.
82+
# external: true tells Compose this volume is not owned by any single project,
83+
# suppressing the "was created for project X" warning when multiple projects
84+
# share it. dxbx creates it on first use via `docker volume create`.
85+
external: true
86+
name: docops-shell-history
87+
docops-project-bundle:
88+
# Disposable: cleared on `dxbx reset`. Rebuilt automatically on next run.
89+
# The actual Docker volume name embeds PROJECT_SLUG for per-project isolation.
90+
name: docops-${PROJECT_SLUG:-project}-bundle
91+
docops-project-node:
92+
# Disposable: cleared on `dxbx reset`. Rebuilt automatically on next npm install.
93+
# Named volume keeps Linux node_modules binaries off the host filesystem.
94+
name: docops-${PROJECT_SLUG:-project}-node
95+
docops-project-python:
96+
# Disposable: cleared on `dxbx reset`. Venv is re-bootstrapped on next container start.
97+
name: docops-${PROJECT_SLUG:-project}-python
98+
docops-npm-cache:
99+
# Shared npm download cache. Speeds up `npm install` across all projects.
100+
# Disposable: safe to delete; npm will re-download packages as needed.
101+
external: true # non-exclusive per project
102+
name: docops-npm-cache
103+
docops-pip-cache:
104+
# Shared pip download cache. Speeds up `pip install` across all projects.
105+
# Disposable: safe to delete; pip will re-download packages
106+
external: true # non-exclusive per project
107+
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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
10+
enable=deprecate-which # Use command -v instead of which
11+
enable=add-default-case # Require a fallthrough *) in case statements
12+
13+
# Quote safety
14+
enable=quote-safe-variables
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[]

.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)