mirror of
https://origin.cursor.com/mrdevmx/panels.git
synced 2026-10-09 14:03:16 +00:00
35 lines
968 B
Docker
35 lines
968 B
Docker
# API PANELS — Deno + SQLite FFI + Liquibase/JRE (Debian slim, no Alpine)
|
|
FROM denoland/deno:2.9.5
|
|
|
|
USER root
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
openjdk-21-jre-headless \
|
|
curl \
|
|
unzip \
|
|
bash \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY db/ ./db/
|
|
COPY api/ ./api/
|
|
COPY web-panel/public/brand/panel-icon-symmetric.png ./api/assets/email/logo.png
|
|
|
|
RUN chmod +x ./db/bootstrap-tools.sh \
|
|
&& ./db/bootstrap-tools.sh \
|
|
&& 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=45s --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", "run", "--allow-net", "--allow-read", "--allow-write", "--allow-env", "--allow-ffi", "--allow-run", "main.ts"]
|