From f607d5d106dc730cdfd0132af80d18c9e26e05e5 Mon Sep 17 00:00:00 2001 From: Bill Ballou Date: Tue, 30 Dec 2025 22:01:17 -0500 Subject: [PATCH] Add Git repository management documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .gitignore configuration for docker-compose projects - Secret scrubbing guidelines for environment files - Repository creation workflow using git-gitea skill - Updated directory structure to include .gitignore and env.example 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- SKILL.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/SKILL.md b/SKILL.md index f420351..c3064cc 100644 --- a/SKILL.md +++ b/SKILL.md @@ -17,8 +17,11 @@ Each project follows this structure: │ ├── docker-compose.yml # Main service definitions │ ├── docker-compose.override.yml # Current host overrides (gitignored) │ ├── .env # Environment variables (gitignored) +│ ├── .gitignore # Excludes /.env and /docker-compose.override.yml +│ ├── env.example # Template for .env files +│ ├── README.md # Setup and usage instructions │ └── environments/ -│ └── / # Per-host configs +│ └── / # Per-host configs (committed, secrets scrubbed) │ ├── .env │ └── docker-compose.override..yml ``` @@ -155,6 +158,60 @@ When creating a new Docker Compose project: 3. Update paths and port mappings for the host 4. Create override compose file if device mappings differ +## Git Repository Management + +Each project should be version controlled with its own git repository. + +### .gitignore Configuration + +```gitignore +# Root environment file (may contain active secrets) +/.env + +# Docker compose override (host-specific, not committed) +/docker-compose.override.yml +``` + +**Note**: Use `/.env` (with leading slash) to only exclude the root `.env` file. Environment files in `environments//` are committed after secret scrubbing. + +### Secret Scrubbing + +Before committing `environments//.env` files, replace secret values: + +| Secret Type | Original | Scrubbed | +|-------------|----------|----------| +| Passwords | `DB_PASSWORD=actual_password` | `DB_PASSWORD=CHANGE_ME_SECRET` | +| API Keys | `API_KEY=sk-abc123...` | `API_KEY=CHANGE_ME_SECRET` | +| Tokens | `AUTH_TOKEN=token_value` | `AUTH_TOKEN=CHANGE_ME_SECRET` | + +**Keep in version control** (non-secret, host-specific): +- Paths: `DATA_LOCATION`, `UPLOAD_PATH` +- Ports: `APP_PORT`, `DB_PORT` +- UIDs/GIDs: `UID`, `GID` +- URLs: `APP_URL`, `DB_HOSTNAME` +- Names: `DB_DATABASE_NAME`, `DB_USERNAME` + +**Exclude or scrub**: +- Passwords, API keys, tokens, secrets + +### Creating a Git Repository + +```bash +# Initialize +cd /docker/config/ +git init && git branch -m main + +# Create remote on Gitea (using git-gitea skill) +source ~/.claude/skills/git-gitea/scripts/gitea-helper.sh +gitea_create_repo "docker-" "Docker Compose configuration for " true + +# Add remote, commit, push +git remote add origin https://git.prettyhefty.com/Bill/docker-.git +git add -A +git commit -m "Initial commit: docker-compose configuration" +git push -u origin main +``` + ## Service Dependencies Use `depends_on` with health checks for proper startup order: