Minimal self hosted E2E Setup with Playwright and Allure (Docker)
his minimal stack shows how to do that with Playwright for tests, Allure for reports, Cronicle for scheduling, and optional self‑hosting via Coolify
Introduction
When your product spans multiple web apps, you still want a single, repeatable pipeline to run end-to-end checks and publish readable reports. This minimal stack shows how to do that with Playwright for tests, Allure for reports, Cronicle for scheduling, and optional self‑hosting via Coolify. It’s intentionally tiny, reproducible, and easy to drop into any repo.
This repository provides a minimal, Docker‑based setup to run Playwright end‑to‑end tests and publish Allure reports. It includes:
A Playwright runner container with an HTTP trigger (
/run
) to start tests on demand.Allure Docker Service to collect results and serve the latest report.
A shared Docker volume (
allure_results
) to persist results between runs.
Prerequisites
Docker with Docker Compose v2 (the
docker compose
command).Open local ports:
6060
(trigger),5050
(Allure API/report).
What’s Inside
docker-compose.yml
: Orchestrates the Playwright runner and Allure service.Dockerfile
: Builds the Playwright environment (browsers + Node dependencies).playwright.config.ts
: Configures Playwright and Allure reporter (allure-results
).scripts/trigger-server.cjs
: Tiny HTTP server that runs tests and refreshes the report.tests/
: Example specs that read target app URLs from environment variables..env.example
: Example variables to point tests at your apps.
Configure Environment
Create a .env
file (or copy from .env.example
) and set your app URLs:
APP_ONE_URL=https://app1.example.com
APP_TWO_URL=https://app2.example.com
Notes:
Tests are skipped automatically if the corresponding URL is not set.
playwright.config.ts
reads.env
(and optional.env.local
to override locally).
Start the Stack
Bring up the services (runner trigger + Allure backend):
docker compose up -d
Trigger server:
http://localhost:6060/health
Allure report (latest):
http://localhost:5050/allure-docker-service/latest-report
Run Tests
Run via HTTP (optional grep filter):
curl -X POST "http://localhost:6060/run"
curl -X POST "http://localhost:6060/run?grep=App%20One"
After a run completes, open the latest report:
http://localhost:5050/allure-docker-service/latest-report
Multiple Applications
This repo demonstrates testing more than one app by using environment variables and lightweight test filtering:
Define one URL per app in
.env
(e.g.,APP_ONE_URL
,APP_TWO_URL
).Spec files (e.g.,
tests/app-one.spec.ts
,tests/app-two.spec.ts
) read these variables and skip if not set.To run only one app’s tests, either set only its URL or add a grep filter:
POST /run?grep=App%20One
.Create separate schedules (e.g., nightly per app) by running the same trigger with different
grep
filters.
This scales to more apps by following the same pattern: one env var per app and a matching spec (or tag/grep) to select it.
Reuse In Your Own Project
Minimal steps to reproduce this setup elsewhere:
Copy these files/folders into your repo (preserving paths):
docker-compose.yml
,Dockerfile
,playwright.config.ts
,scripts/trigger-server.cjs
,tests/
,.env.example
Include the following
devDependencies
in yourpackage.json
(versions can be updated):@playwright/test
,allure-playwright
,dotenv
,typescript
,ts-node
Create a
.env
with your target app URLs.Start services:
docker compose up -d
Run tests with
curl -X POST http://localhost:6060/run
(this could also be done with a command that runs in the server)View the report at
http://localhost:5050/allure-docker-service/latest-report
This arrangement keeps your host clean (browsers run in the container), provides a stable Allure backend, and enables on-demand or scheduled test execution.
Cronicle Setup (Scheduler)
Use Cronicle to schedule test runs (e.g., nightly) by calling the trigger server. Add this service to your Docker Compose (or deploy it via Coolify):
version: '3.8'
services:
cronicle:
image: 'soulteary/cronicle:latest'
container_name: cronicle
hostname: cronicle
environment:
- SERVICE_FQDN_CRONICLE_3012=<cronicle.<your-domain>.com>
- 'TZ=${TZ:-UTC}'
- 'GENERIC_TIMEZONE=${GENERIC_TIMEZONE:-UTC}'
ports:
- '3012:3012'
volumes:
- 'cronicle_data:/opt/cronicle/data'
- 'cronicle_logs:/opt/cronicle/logs'
- 'cronicle_plugins:/opt/cronicle/plugins'
- '/etc/localtime:/etc/localtime:ro'
- '/etc/timezone:/etc/timezone:ro'
healthcheck:
test:
- CMD-SHELL
- 'wget -qO- http://127.0.0.1:3012/'
interval: 5s
timeout: 20s
retries: 10
restart: unless-stopped
volumes:
cronicle_data: null
cronicle_logs: null
cronicle_plugins: null
Steps:
Start Cronicle:
docker compose up -d cronicle
and openhttp://<your_host>:3012
(or the Coolify‑assigned domain).Initial setup: create the admin account when prompted.
Add a Job to trigger tests:
Type/Plugin: Shell Script
Command (same Docker network as
playwright-runner
):curl -fsS -X POST http://playwright-runner:6060/run
Schedule: choose desired cadence (e.g., daily at 02:00 UTC)
Concurrency: 1 (optional), Retries: as needed
For app‑specific jobs, add a grep filter:
curl -fsS -X POST "http://playwright-runner:6060/run?grep=App%20One"
curl -fsS -X POST "http://playwright-runner:6060/run?grep=App%20Two"
Notes:
If Cronicle is not on the same Docker network, point it to the public runner URL (e.g.,
http(s)://<your_domain>/run
).The trigger server already refreshes the Allure report after the run; simply open the latest report URL when the job finishes.
Coolify Notes
Compose includes
SERVICE_FQDN_*
envs so Coolify can auto‑assign domains per exposed port.Allure (API + latest report):
https://<assigned-domain>/allure-docker-service/latest-report
Cronicle UI:
https://<assigned-domain>
for port 3012.Within the same Coolify stack, service names (e.g.,
playwright-runner
,allure-dashboard
) resolve over the internal network for scheduler calls.
Related Posts
How to Fix Docker Orphaned Layers and Reclaim Lost Disk Space
Learn how to identify and fix Docker's with Coolify orphaned layer problem that wastes disk space. Step-by-step guide to safely reset Docker data directory and reclaim gigabytes of storage on your VPS server.
How to Manage SQLite Databases on a VPS ( with Coolify )
The Problem Keeping a SQLite database consistent between a Docker‑based VPS and local development requires a shared persistent volume, correct path...
Safely Running Ollama with CPU Temperature Checks in Python
Learn how to wrap Ollama models with a CPU temperature check in Python. This tutorial shows you how to prevent overheating by pausing execution when system temperatures exceed safe limits.
Let's connect !!
Get in touch if you want updates, examples, and insights on how AI agents, Langchain and more are evolving and where they’re going next.