Files
matomo-bootstrap/tests/e2e/docker-compose.yml
Kevin Veen-Birkenbach 5e5b6c8933
Some checks failed
CI / test (push) Has been cancelled
fix(nix/e2e): keep Playwright install output off stdout
- Build matomo-bootstrap with setuptools/wheel in Nix
- Run playwright install via a dedicated pythonPlaywright env and redirect logs to stderr
- Add Nix-based E2E path: nix runner service + persistent nix/home volumes + host networking
- Add E2E test that runs bootstrap via `nix run` and asserts token-only stdout

https://chatgpt.com/share/694ab489-7028-800f-8398-a19a99faffd0
2025-12-23 17:44:41 +01:00

77 lines
1.8 KiB
YAML

services:
db:
image: mariadb:11
container_name: e2e-db
environment:
MARIADB_DATABASE: matomo
MARIADB_USER: matomo
MARIADB_PASSWORD: matomo_pw
MARIADB_ROOT_PASSWORD: root_pw
healthcheck:
test: ["CMD-SHELL", "mariadb-admin ping -uroot -proot_pw --silent"]
interval: 5s
timeout: 3s
retries: 60
matomo:
image: matomo:5.3.2
container_name: e2e-matomo
depends_on:
db:
condition: service_healthy
ports:
- "8080:80"
environment:
MATOMO_DATABASE_HOST: db
MATOMO_DATABASE_ADAPTER: mysql
MATOMO_DATABASE_USERNAME: matomo
MATOMO_DATABASE_PASSWORD: matomo_pw
MATOMO_DATABASE_DBNAME: matomo
nix:
image: nixos/nix:latest
container_name: e2e-nix
depends_on:
matomo:
condition: service_started
# Run as root to avoid /nix big-lock permission issues
user: "0:0"
working_dir: /work
volumes:
# Project root as flake
- ../../:/work:ro
# Nix store (removed by docker compose down -v)
- e2e_nix_store:/nix
# HOME/XDG for nix + playwright
- e2e_nix_home:/tmp/home
environment:
NIX_CONFIG: "experimental-features = nix-command flakes"
TERM: "xterm"
HOME: "/tmp/home"
USER: "root"
LOGNAME: "root"
XDG_CACHE_HOME: "/tmp/home/.cache"
XDG_CONFIG_HOME: "/tmp/home/.config"
XDG_DATA_HOME: "/tmp/home/.local/share"
MATOMO_SITE_NAME: "Matomo E2E"
MATOMO_SITE_URL: "http://127.0.0.1:8080"
MATOMO_TIMEZONE: "Germany - Berlin"
command: >
sh -lc "mkdir -p /tmp/home/.cache /tmp/home/.config /tmp/home/.local/share;
tail -f /dev/null"
# Allow access to host-published Matomo port
network_mode: host
volumes:
e2e_nix_store:
e2e_nix_home: