mirror of
https://origin.cursor.com/mrdevmx/panels.git
synced 2026-10-09 18:43:18 +00:00
El cliente S3 lee osRelease; sin --allow-sys el ping a R2 falla con NotCapable aunque endpoint y bucket estén bien. Co-authored-by: alberto.martinez <alberto.martinez@mrdev.mx>
24 lines
894 B
Docker
24 lines
894 B
Docker
# API PANELS — Deno + Postgres (postgres.js) + Redis. Ya no necesita FFI de
|
|
# SQLite ni JRE/Liquibase en la imagen de runtime -- las migraciones corren
|
|
# como paso explícito de deploy (ver db/update.sh), no al arrancar la app.
|
|
FROM denoland/deno:2.9.5
|
|
|
|
WORKDIR /app
|
|
|
|
COPY api/ ./api/
|
|
COPY web-panel/public/brand/panel-icon-symmetric.png ./api/assets/email/logo.png
|
|
|
|
RUN mkdir -p /app/data && chown -R deno:deno /app
|
|
|
|
USER deno
|
|
WORKDIR /app/api
|
|
RUN deno cache main.ts
|
|
|
|
ENV PORT=8000
|
|
EXPOSE 8000
|
|
|
|
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)"]
|
|
|
|
# --allow-sys: AWS SDK v3 (R2) lee osRelease; sin esto Deno lanza NotCapable.
|
|
CMD ["deno", "run", "--allow-net", "--allow-read", "--allow-write", "--allow-env", "--allow-sys", "main.ts"]
|