diff --git a/Dockerfile b/Dockerfile index 8830069..0342f81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,14 @@ # syntax=docker/dockerfile:1 +# ---------- Stage 1: Build editor JS/CSS ---------- +FROM node:20-slim AS editor-build +WORKDIR /build +COPY shared_lib/editor/package.json shared_lib/editor/package-lock.json* ./ +RUN npm ci --ignore-scripts 2>/dev/null || npm install +COPY shared_lib/editor/ ./ +RUN NODE_ENV=production node build.mjs + +# ---------- Stage 2: Python runtime ---------- FROM python:3.11-slim AS base ENV PYTHONDONTWRITEBYTECODE=1 \ @@ -21,6 +30,9 @@ RUN pip install -r requirements.txt COPY . . +# Copy built editor assets from stage 1 +COPY --from=editor-build /static/scripts/editor.js /static/scripts/editor.css shared_lib/static/scripts/ + # Link app blueprints into the shared library's namespace RUN ln -s /app/bp /app/shared_lib/suma_browser/app/bp diff --git a/templates/_types/post/admin/_oob_elements.html b/templates/_types/post/admin/_oob_elements.html index 4bd3b74..d397c68 100644 --- a/templates/_types/post/admin/_oob_elements.html +++ b/templates/_types/post/admin/_oob_elements.html @@ -18,5 +18,5 @@ {% endblock %} {% block content %} -nowt + {% include '_types/post/admin/_main_panel.html' %} {% endblock %} \ No newline at end of file diff --git a/templates/_types/post/admin/index.html b/templates/_types/post/admin/index.html index fb1de5f..1a7cc45 100644 --- a/templates/_types/post/admin/index.html +++ b/templates/_types/post/admin/index.html @@ -14,5 +14,5 @@ {% endblock %} {% block content %} -nowt + {% include '_types/post/admin/_main_panel.html' %} {% endblock %}