Agregar archivos de configuración y script para la creación de imágenes Docker
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"fingerprint": "02173aa6e303f939322499dd837c8b1d1f8b2500"
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# Skill Registry — tx-image-creation
|
||||||
|
|
||||||
|
<!-- Auto-generated by gentle-ai skill-registry refresh. Run `gentle-ai skill-registry refresh --force` to regenerate. -->
|
||||||
|
|
||||||
|
Last updated: 2026-08-14
|
||||||
|
|
||||||
|
## Sources scanned
|
||||||
|
|
||||||
|
- C:\Users\horacio\.config\opencode\skills
|
||||||
|
- C:\Users\horacio\.copilot\skills
|
||||||
|
- C:\Users\horacio\.codex\skills
|
||||||
|
|
||||||
|
## Contract
|
||||||
|
|
||||||
|
**Delegator use only.** This registry is an index, not a summary. Any agent that launches subagents reads it to select relevant skills, then passes exact `SKILL.md` paths for the subagent to read before work.
|
||||||
|
|
||||||
|
`SKILL.md` remains the source of truth. Do not inject generated summaries or compact rules by default; pass paths so subagents load the full runtime contract and preserve author intent.
|
||||||
|
|
||||||
|
## Skills
|
||||||
|
|
||||||
|
| Skill | Trigger / description | Scope | Path |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| `branch-pr` | Create Gentle AI pull requests with issue-first checks. Trigger: creating, opening, or preparing PRs for review. | user | `C:\Users\horacio\.config\opencode\skills\branch-pr\SKILL.md` |
|
||||||
|
| `chained-pr` | Trigger: PRs over 400 lines, stacked PRs, review slices. Split oversized changes into chained PRs that protect review focus. | user | `C:\Users\horacio\.config\opencode\skills\chained-pr\SKILL.md` |
|
||||||
|
| `cognitive-doc-design` | Design docs that reduce cognitive load. Trigger: writing guides, READMEs, RFCs, onboarding, architecture, or review-facing docs. | user | `C:\Users\horacio\.config\opencode\skills\cognitive-doc-design\SKILL.md` |
|
||||||
|
| `comment-writer` | Write warm, direct collaboration comments. Trigger: PR feedback, issue replies, reviews, Slack messages, or GitHub comments. | user | `C:\Users\horacio\.config\opencode\skills\comment-writer\SKILL.md` |
|
||||||
|
| `gentle-ai-bench` | Trigger: bench, journey, journeys, driven mode, gentle-ai-bench, journey corpus, j-numbers, bench axis. Author and verify gentle-ai bench journeys; go test ./bench never proves driven execution. | user | `C:\Users\horacio\.config\opencode\skills\gentle-ai-bench\SKILL.md` |
|
||||||
|
| `go-testing` | Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns. | user | `C:\Users\horacio\.config\opencode\skills\go-testing\SKILL.md` |
|
||||||
|
| `issue-creation` | Create and triage GitHub issues from repository evidence. Trigger: issue creation, bug reports, feature requests, or issue approval. | user | `C:\Users\horacio\.config\opencode\skills\issue-creation\SKILL.md` |
|
||||||
|
| `judgment-day` | Trigger: judgment day, dual review, adversarial review, juzgar. Run explicit blind dual review with at most two scoped fix/re-judgment rounds. | user | `C:\Users\horacio\.config\opencode\skills\judgment-day\SKILL.md` |
|
||||||
|
| `rdd-defect-workflow` | Trigger: RDD, receipt-driven development, review authority, receipt/lineage, correction/recovery, delivery gate/kill switch, bounded review defects. Guide work. | user | `C:\Users\horacio\.config\opencode\skills\rdd-defect-workflow\SKILL.md` |
|
||||||
|
| `skill-creator` | Trigger: new skills, agent instructions, documenting AI usage patterns. Create LLM-first skills with valid frontmatter. | user | `C:\Users\horacio\.config\opencode\skills\skill-creator\SKILL.md` |
|
||||||
|
| `skill-improver` | Trigger: improve skills, audit skills, refactor skills, skill quality. Audit and upgrade existing LLM-first skills. | user | `C:\Users\horacio\.config\opencode\skills\skill-improver\SKILL.md` |
|
||||||
|
| `systemic-issue-triage` | Trigger: new issue, bug report, triage, backlog, issue flood, community report, root cause, dead-end, blocked user. Attack issues by root class, never one-by-one; fixes must shrink the system, not grow it. | user | `C:\Users\horacio\.config\opencode\skills\systemic-issue-triage\SKILL.md` |
|
||||||
|
| `work-unit-commits` | Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code. | user | `C:\Users\horacio\.config\opencode\skills\work-unit-commits\SKILL.md` |
|
||||||
|
|
||||||
|
## Loading protocol
|
||||||
|
|
||||||
|
1. Match task context and target files against the `Trigger / description` column.
|
||||||
|
2. Pass only the matching `Path` values to the subagent under `## Skills to load before work`.
|
||||||
|
3. Instruct the subagent to read those exact `SKILL.md` files before reading, writing, reviewing, testing, or creating artifacts.
|
||||||
|
4. If no matching skill exists, proceed without project skill injection and report `skill_resolution: none`.
|
||||||
@@ -0,0 +1,251 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
REPOSITORY_URL="ssh://git@git.hdrdevs.com.ar:2222/horacio/turnosxpress.git"
|
||||||
|
DEFAULT_BRANCH="main"
|
||||||
|
DEFAULT_TARGET_DIR="$HOME/PRODUCCION/turnosxpress"
|
||||||
|
|
||||||
|
if [[ -t 1 ]]; then
|
||||||
|
BLUE="\033[0;34m"
|
||||||
|
GREEN="\033[0;32m"
|
||||||
|
YELLOW="\033[1;33m"
|
||||||
|
CYAN="\033[0;36m"
|
||||||
|
RED="\033[0;31m"
|
||||||
|
RESET="\033[0m"
|
||||||
|
else
|
||||||
|
BLUE=""
|
||||||
|
GREEN=""
|
||||||
|
YELLOW=""
|
||||||
|
CYAN=""
|
||||||
|
RED=""
|
||||||
|
RESET=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
step() {
|
||||||
|
echo -e "${BLUE}▶ $1${RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
success() {
|
||||||
|
echo -e "${GREEN}✅ $1${RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
skip() {
|
||||||
|
echo -e "${YELLOW}⏭️ $1${RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
info() {
|
||||||
|
echo -e "${CYAN}ℹ️ $1${RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
warn() {
|
||||||
|
echo -e "${RED}⚠️ $1${RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
DIRECTORIES_TO_REMOVE=(
|
||||||
|
".atl"
|
||||||
|
".codegraph"
|
||||||
|
".opencode"
|
||||||
|
"backupper"
|
||||||
|
"bot-admin-api"
|
||||||
|
"com.hdrdevs.turnosxpress"
|
||||||
|
"file-manager"
|
||||||
|
"mongo-db"
|
||||||
|
"notification-sender"
|
||||||
|
"openspec"
|
||||||
|
"sysadmin"
|
||||||
|
"sysadmin-cli"
|
||||||
|
"txadmin"
|
||||||
|
"txbot"
|
||||||
|
"working-web"
|
||||||
|
)
|
||||||
|
|
||||||
|
FILES_TO_REMOVE=(
|
||||||
|
".dockerignore"
|
||||||
|
".gitignore"
|
||||||
|
"Dockerfile.alpine"
|
||||||
|
"Dockerfile.debian"
|
||||||
|
)
|
||||||
|
|
||||||
|
SERVER_DIRECTORIES_TO_REMOVE=(
|
||||||
|
"node_modules"
|
||||||
|
)
|
||||||
|
|
||||||
|
SERVER_FILES_TO_REMOVE=(
|
||||||
|
".env"
|
||||||
|
".env.android"
|
||||||
|
".env.dev"
|
||||||
|
".env.omv"
|
||||||
|
".env.txlocal"
|
||||||
|
)
|
||||||
|
|
||||||
|
TXCLIENT_DIRECTORIES_TO_REMOVE=(
|
||||||
|
".next"
|
||||||
|
"node_modules"
|
||||||
|
)
|
||||||
|
|
||||||
|
TXCLIENT_FILES_TO_REMOVE=(
|
||||||
|
".env"
|
||||||
|
".env.android"
|
||||||
|
".env.dev"
|
||||||
|
".env.omv"
|
||||||
|
".env.txlocal"
|
||||||
|
)
|
||||||
|
|
||||||
|
branch="${1:-$DEFAULT_BRANCH}"
|
||||||
|
target_dir="${2:-$DEFAULT_TARGET_DIR}"
|
||||||
|
timestamp="$(date +%Y%m%d-%H%M)"
|
||||||
|
image_archive="turnosxpress-${timestamp}.tar"
|
||||||
|
|
||||||
|
if [[ "$branch" == "-h" || "$branch" == "--help" ]]; then
|
||||||
|
cat <<USAGE
|
||||||
|
Usage: $0 [branch] [target-directory]
|
||||||
|
|
||||||
|
Clones the TurnosXpress repository and updates the selected branch.
|
||||||
|
After the repository is ready, it removes development and deployment folders/files
|
||||||
|
that are not needed by this workspace.
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
branch Branch to clone/update. Defaults to: ${DEFAULT_BRANCH}
|
||||||
|
target-directory Directory where the repository is cloned. Defaults to: ${DEFAULT_TARGET_DIR}
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
$0
|
||||||
|
$0 develop
|
||||||
|
$0 feature/new-flow ../turnosxpress-feature
|
||||||
|
USAGE
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
step "Cleaning target directory '$target_dir'"
|
||||||
|
rm -rf -- "$target_dir"
|
||||||
|
mkdir -p -- "$(dirname -- "$target_dir")"
|
||||||
|
success "Target directory is clean"
|
||||||
|
|
||||||
|
step "Cloning branch '$branch' into '$target_dir'"
|
||||||
|
git clone --branch "$branch" --single-branch "$REPOSITORY_URL" "$target_dir"
|
||||||
|
success "Repository cloned"
|
||||||
|
|
||||||
|
step "Removing excluded root directories and files"
|
||||||
|
|
||||||
|
for directory in "${DIRECTORIES_TO_REMOVE[@]}"; do
|
||||||
|
path="$target_dir/$directory"
|
||||||
|
|
||||||
|
if [[ -d "$path" ]]; then
|
||||||
|
rm -rf -- "$path"
|
||||||
|
success "Removed directory: $directory"
|
||||||
|
else
|
||||||
|
skip "Directory not found: $directory"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for file in "${FILES_TO_REMOVE[@]}"; do
|
||||||
|
path="$target_dir/$file"
|
||||||
|
|
||||||
|
if [[ -f "$path" ]]; then
|
||||||
|
rm -f -- "$path"
|
||||||
|
success "Removed file: $file"
|
||||||
|
else
|
||||||
|
skip "File not found: $file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
server_dir="$target_dir/server"
|
||||||
|
|
||||||
|
if [[ -d "$server_dir" ]]; then
|
||||||
|
step "Removing excluded server directories and files"
|
||||||
|
|
||||||
|
for directory in "${SERVER_DIRECTORIES_TO_REMOVE[@]}"; do
|
||||||
|
path="$server_dir/$directory"
|
||||||
|
|
||||||
|
if [[ -d "$path" ]]; then
|
||||||
|
rm -rf -- "$path"
|
||||||
|
success "Removed server directory: $directory"
|
||||||
|
else
|
||||||
|
skip "Server directory not found: $directory"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for file in "${SERVER_FILES_TO_REMOVE[@]}"; do
|
||||||
|
path="$server_dir/$file"
|
||||||
|
|
||||||
|
if [[ -f "$path" ]]; then
|
||||||
|
rm -f -- "$path"
|
||||||
|
success "Removed server file: $file"
|
||||||
|
else
|
||||||
|
skip "Server file not found: $file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -f "$server_dir/.env.prod" ]]; then
|
||||||
|
mv -- "$server_dir/.env.prod" "$server_dir/.env"
|
||||||
|
success "Renamed server file: .env.prod -> .env"
|
||||||
|
else
|
||||||
|
skip "Server file not found: .env.prod"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Server directory not found. Skipping server cleanup"
|
||||||
|
fi
|
||||||
|
|
||||||
|
txclient_dir="$target_dir/txclient"
|
||||||
|
|
||||||
|
if [[ -d "$txclient_dir" ]]; then
|
||||||
|
step "Removing excluded txclient directories and files"
|
||||||
|
|
||||||
|
for directory in "${TXCLIENT_DIRECTORIES_TO_REMOVE[@]}"; do
|
||||||
|
path="$txclient_dir/$directory"
|
||||||
|
|
||||||
|
if [[ -d "$path" ]]; then
|
||||||
|
rm -rf -- "$path"
|
||||||
|
success "Removed txclient directory: $directory"
|
||||||
|
else
|
||||||
|
skip "Txclient directory not found: $directory"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for file in "${TXCLIENT_FILES_TO_REMOVE[@]}"; do
|
||||||
|
path="$txclient_dir/$file"
|
||||||
|
|
||||||
|
if [[ -f "$path" ]]; then
|
||||||
|
rm -f -- "$path"
|
||||||
|
success "Removed txclient file: $file"
|
||||||
|
else
|
||||||
|
skip "Txclient file not found: $file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -f "$txclient_dir/.env.prod" ]]; then
|
||||||
|
mv -- "$txclient_dir/.env.prod" "$txclient_dir/.env"
|
||||||
|
success "Renamed txclient file: .env.prod -> .env"
|
||||||
|
else
|
||||||
|
skip "Txclient file not found: .env.prod"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Txclient directory not found. Skipping txclient cleanup"
|
||||||
|
fi
|
||||||
|
|
||||||
|
step "Building Docker image"
|
||||||
|
(
|
||||||
|
cd "$target_dir"
|
||||||
|
info "Stopping container: turnosxpress"
|
||||||
|
docker stop turnosxpress || true
|
||||||
|
info "Removing container: turnosxpress"
|
||||||
|
docker rm turnosxpress || true
|
||||||
|
info "Removing image: turnosxpress:latest"
|
||||||
|
docker rmi turnosxpress:latest || true
|
||||||
|
info "Building image: turnosxpress:latest"
|
||||||
|
docker build -t turnosxpress .
|
||||||
|
)
|
||||||
|
success "Docker image built"
|
||||||
|
|
||||||
|
step "Exporting Docker image"
|
||||||
|
(
|
||||||
|
cd "$HOME/PRODUCCION"
|
||||||
|
info "Saving image to: $image_archive"
|
||||||
|
docker save turnosxpress:latest -o "$image_archive"
|
||||||
|
info "Compressing image: ${image_archive}.gz"
|
||||||
|
gzip -f "$image_archive"
|
||||||
|
)
|
||||||
|
success "Docker image exported to '$HOME/PRODUCCION/${image_archive}.gz'"
|
||||||
|
|
||||||
|
success "Done. Repository is ready at '$target_dir' on branch '$branch'"
|
||||||
Reference in New Issue
Block a user