xref: /plugin/bpmnio/test/start-test-env.sh (revision 43854469855b0d3261173416b47cbad6e62bc444)
1#!/bin/bash
2# Start the DokuWiki test environment
3set -e
4cd "$(dirname "$0")"
5
6echo "Starting DokuWiki test environment..."
7docker compose up -d
8
9echo "Waiting for DokuWiki to become healthy..."
10for i in {1..30}; do
11    if docker inspect --format='{{.State.Health.Status}}' dokuwiki-bpmnio-test 2>/dev/null | grep -q healthy; then
12        echo "DokuWiki is ready: http://localhost:8080"
13        echo "  BPMN: http://localhost:8080/doku.php?id=test:bpmn-test"
14        echo "  DMN:  http://localhost:8080/doku.php?id=test:dmn-test"
15        exit 0
16    fi
17    sleep 2
18done
19
20echo "ERROR: Timeout waiting for DokuWiki"
21docker logs dokuwiki-bpmnio-test --tail 20
22exit 1
23