Modulo makers3d desarrollado con codex V 0.0.1

This commit is contained in:
Ryuk Mike
2026-07-29 23:58:58 +02:00
commit 2bedf7cbb7
171 changed files with 29421 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -Eeuo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
CRON_FILE="/etc/cron.d/makers3d-cert-renew"
LOG_FILE="/var/log/makers3d-cert-renew.log"
cat > "${CRON_FILE}" <<EOF
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
17 3,15 * * * root cd ${ROOT_DIR} && ./scripts/renew-certs.sh >> ${LOG_FILE} 2>&1
EOF
chmod 0644 "${CRON_FILE}"
touch "${LOG_FILE}"
if command -v systemctl >/dev/null 2>&1; then
systemctl restart cron || systemctl restart crond || true
fi
echo "Cron de renovacion instalado en ${CRON_FILE}"
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -Eeuo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT_DIR}"
docker compose run --rm certbot renew --webroot -w /var/www/certbot --quiet
docker compose exec -T nginx nginx -s reload
echo "Renovacion completada"
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -Eeuo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
DOMAIN="${1:-dev.jazari.com.ar}"
EMAIL="${2:-}"
cd "${ROOT_DIR}"
mkdir -p infrastructure/nginx/runtime
cp infrastructure/nginx/nginx.http.conf infrastructure/nginx/runtime/nginx.conf
docker compose up -d nginx
CERTBOT_ARGS=(
run --rm
certbot
certonly
--webroot
-w /var/www/certbot
-d "${DOMAIN}"
--agree-tos
--non-interactive
)
if [[ -n "${EMAIL}" ]]; then
CERTBOT_ARGS+=(--email "${EMAIL}")
else
CERTBOT_ARGS+=(--register-unsafely-without-email)
fi
docker compose "${CERTBOT_ARGS[@]}"
cp infrastructure/nginx/nginx.https.conf infrastructure/nginx/runtime/nginx.conf
docker compose up -d --force-recreate nginx
echo "HTTPS listo para ${DOMAIN}"
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -Eeuo pipefail
BASE_URL="${1:-http://127.0.0.1}"
echo "[1/4] Health"
curl -fsS "${BASE_URL}/api/v1/health" >/dev/null
echo "[2/4] Makers"
curl -fsS "${BASE_URL}/api/v1/makers" >/dev/null
echo "[3/4] Home"
curl -fsS "${BASE_URL}/" >/dev/null
echo "[4/4] Login page"
curl -fsS "${BASE_URL}/login" >/dev/null
echo "Smoke test OK"