Diffy documentation
  • Features
    • 👋Welcome
    • Mask & Exclude
    • JavaScript snippets
    • HTTP headers
    • Cookies
    • CSS overrides
    • Mock content
    • Dealing with Dynamic Elements
      • Freeze Carousels / Sliders
      • Cookies Policy Popups
    • Configure project from YAML file
    • Zapier integration (JIRA, Trello, Basecamp integrations)
    • Bypass protection Cloudfront, Akamai, Incapsula
      • Bypass Akamai protection
      • Bypass Imperva Incapsula protection
    • Tags
    • Figma
    • Local development
      • DDEV add-on
      • Lando integration
      • Docksal
      • Standalone docker container
      • Ngrok
  • Automation
    • 💡Overview
    • GitHub Pantheon CircleCI
    • GitHub Pantheon GitHub Actions
    • GitHub Tugboat
    • Platformsh GitHub Action
  • Tutorials
    • Comparison review
Powered by GitBook
On this page
  • Snippet to .docksal/docksal.yml file
  • Install worker code
  • Provide the API Key and Project ID to .env file
  • Run screenshots
  1. Features
  2. Local development

Docksal

Create screenshots from your Docksal local site and upload them to Diffy.

PreviousLando integrationNextStandalone docker container

Last updated 23 hours ago

Snippet to .docksal/docksal.yml file

You need to add a new service

services:
  # Diffy
  diffy:
    hostname: diffy
    image: diffywebsite2/screenshot-worker:0.0.4
    volumes:
      - ${PROJECT_ROOT}:/app:rw
    command: tail -f /dev/null

This creates a container and mounts the whole project's directory under /app directory in the container.

Remember to restart the environment to pull the container.

Install worker code

Now we can ssh to the container and install the worker's code

fin exec --in=diffy bash
su ubuntu
cd /app/ && mkdir .diffy-worker && cd .diffy-worker
wget -qO- https://github.com/DiffyWebsite/diffy-worker/archive/refs/heads/chrome136.tar.gz | tar xz --strip-components=1
npm install

Provide the API Key and Project ID to .env file

Run screenshots

Run the screenshots command inside your container as ubuntu user:

cd /app/.diffy-worker
node --env-file=.env diffy-screenshots --url=https://docksal-demo.docksal.site --screenshot-name=docksal

Remember to adjust the --url for your local site's name and you can fine tune the name of the screenshots as well.

Inside of .diffy-worker directory, you need to create a .env file (copy it from .env.example) and provide DIFFY_API_KEY and DIFFY_PROJECT_ID. These are to be obtained from the Diffy application. You can generate the API Key on .

the Keys page
video walkthrough of integration with Diffy