feat: export to video migration part (#37213)

This commit is contained in:
Alex V
2025-08-28 13:37:59 +02:00
committed by GitHub
parent 9c32ee5e4e
commit 1ea7b9b5ef
11 changed files with 131 additions and 3 deletions

View File

@@ -141,6 +141,7 @@ COPY --from=frontend-build /code/frontend/dist /code/frontend/dist
RUN SKIP_SERVICE_VERSION_REQUIREMENTS=1 STATIC_COLLECTION=1 DATABASE_URL='postgres:///' REDIS_URL='redis:///' python manage.py collectstatic --noinput
#
# ---------------------------------------------------------
#
@@ -180,7 +181,8 @@ RUN apt-get update && \
"libxmlsec1" \
"libxmlsec1-dev" \
"libxml2" \
"gettext-base"
"gettext-base" \
"ffmpeg=7:5.1.6-0+deb12u1"
# Install MS SQL dependencies
RUN curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
@@ -228,6 +230,16 @@ COPY --from=posthog-build --chown=posthog:posthog /python-runtime /python-runtim
ENV PATH=/python-runtime/bin:$PATH \
PYTHONPATH=/python-runtime
# Install Playwright Chromium browser for video export (as root for system deps)
USER root
RUN /python-runtime/bin/python -m playwright install --with-deps chromium
USER posthog
# Validate video export dependencies
RUN ffmpeg -version
RUN /python-runtime/bin/python -c "import playwright; print('Playwright package imported successfully')"
RUN /python-runtime/bin/python -c "from playwright.sync_api import sync_playwright; print('Playwright sync API available')"
# Copy the frontend assets from the frontend-build stage.
# TODO: this copy should not be necessary, we should remove it once we verify everything still works.
COPY --from=frontend-build --chown=posthog:posthog /code/frontend/dist /code/frontend/dist