diff --git a/Dockerfile b/Dockerfile index dce1bc7d755..285ee674e3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,6 +44,7 @@ RUN pnpm build FROM ghcr.io/posthog/rust-node-container:bullseye_rust_1.80.1-node_18.19.1 AS plugin-server-build WORKDIR /code COPY ./rust ./rust +COPY ./plugin-transpiler/ ./plugin-transpiler/ WORKDIR /code/plugin-server SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] @@ -63,6 +64,9 @@ RUN apt-get update && \ corepack enable && \ mkdir /tmp/pnpm-store && \ pnpm install --frozen-lockfile --store-dir /tmp/pnpm-store && \ + cd ../plugin-transpiler && \ + pnpm install --frozen-lockfile --store-dir /tmp/pnpm-store && \ + pnpm build && \ rm -rf /tmp/pnpm-store # Build the plugin server. @@ -186,11 +190,11 @@ ARG COMMIT_HASH RUN echo $COMMIT_HASH > /code/commit.txt # Add in the compiled plugin-server & its runtime dependencies from the plugin-server-build stage. +COPY --from=plugin-server-build --chown=posthog:posthog /code/plugin-transpiler/dist /code/plugin-transpiler/dist COPY --from=plugin-server-build --chown=posthog:posthog /code/plugin-server/dist /code/plugin-server/dist COPY --from=plugin-server-build --chown=posthog:posthog /code/plugin-server/node_modules /code/plugin-server/node_modules COPY --from=plugin-server-build --chown=posthog:posthog /code/plugin-server/package.json /code/plugin-server/package.json - # Copy the Python dependencies and Django staticfiles from the posthog-build stage. COPY --from=posthog-build --chown=posthog:posthog /code/staticfiles /code/staticfiles COPY --from=posthog-build --chown=posthog:posthog /python-runtime /python-runtime