Compare commits

..

1 commit

Author SHA1 Message Date
Cursor Origin
fc5c2c0791 Pre-computed merge for change #1 1970-01-01 00:00:00 +00:00
5 changed files with 7 additions and 8 deletions

View file

@ -103,7 +103,7 @@ jobs:
working-directory: api working-directory: api
env: env:
DATABASE_URL_CORE_OWNER: postgresql://panels_core_owner:ci-core-owner@localhost:5432/panels_product DATABASE_URL_CORE_OWNER: postgresql://panels_core_owner:ci-core-owner@localhost:5432/panels_product
run: deno test --allow-net --allow-read --allow-write --allow-env --allow-sys run: deno test --allow-net --allow-read --allow-write --allow-env
web: web:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -20,5 +20,4 @@ EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD ["deno", "eval", "const r=await fetch('http://127.0.0.1:'+(Deno.env.get('PORT')||'8000')+'/v1/health'); if(!r.ok) Deno.exit(1)"] CMD ["deno", "eval", "const r=await fetch('http://127.0.0.1:'+(Deno.env.get('PORT')||'8000')+'/v1/health'); if(!r.ok) Deno.exit(1)"]
# --allow-sys: AWS SDK v3 (R2) lee osRelease; sin esto Deno lanza NotCapable. CMD ["deno", "run", "--allow-net", "--allow-read", "--allow-write", "--allow-env", "main.ts"]
CMD ["deno", "run", "--allow-net", "--allow-read", "--allow-write", "--allow-env", "--allow-sys", "main.ts"]

View file

@ -2,11 +2,11 @@
"name": "panel-obra-api", "name": "panel-obra-api",
"exports": "./main.ts", "exports": "./main.ts",
"tasks": { "tasks": {
"dev": "deno run --allow-net --allow-read --allow-write --allow-env --allow-sys --env-file=../.env main.ts", "dev": "deno run --allow-net --allow-read --allow-write --allow-env --env-file=../.env main.ts",
"start": "deno run --allow-net --allow-read --allow-write --allow-env --allow-sys main.ts", "start": "deno run --allow-net --allow-read --allow-write --allow-env main.ts",
"migrate": "cd .. && ./db/update.sh all", "migrate": "cd .. && ./db/update.sh all",
"check": "deno check main.ts", "check": "deno check main.ts",
"test": "deno test --allow-net --allow-read --allow-write --allow-env --allow-sys" "test": "deno test --allow-net --allow-read --allow-write --allow-env"
}, },
"imports": { "imports": {
"hono": "jsr:@hono/hono@4", "hono": "jsr:@hono/hono@4",

View file

@ -3,7 +3,7 @@
* R2 suele devolver 403 con tokens acotados al bucket. * R2 suele devolver 403 con tokens acotados al bucket.
* *
* Desde api/: * Desde api/:
* deno run --allow-net --allow-env --allow-read --allow-write --allow-sys scripts/verify-storage.ts * deno run --allow-net --allow-env --allow-read --allow-write scripts/verify-storage.ts
* *
* Requiere S3_ENDPOINT, S3_BUCKET, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY. * Requiere S3_ENDPOINT, S3_BUCKET, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY.
* Si REQUIRE_S3=1 y no hay credenciales, sale con error (staging/prod). * Si REQUIRE_S3=1 y no hay credenciales, sale con error (staging/prod).

View file

@ -60,7 +60,7 @@ need REDIS_URL_CORE && check "core redis PING" redis-cli -u "$REDIS_URL_CORE" PI
echo "== Contabo (S3) ==" echo "== Contabo (S3) =="
if command -v deno >/dev/null 2>&1; then if command -v deno >/dev/null 2>&1; then
if (cd "$ROOT/api" && REQUIRE_S3="${REQUIRE_S3:-}" deno run --allow-net --allow-env --allow-read --allow-write --allow-sys scripts/verify-storage.ts); then if (cd "$ROOT/api" && REQUIRE_S3="${REQUIRE_S3:-}" deno run --allow-net --allow-env --allow-read --allow-write scripts/verify-storage.ts); then
: :
else else
fail=1 fail=1