Skip to content

Release Self-Hosted Images #18

Release Self-Hosted Images

Release Self-Hosted Images #18

name: Test Self-Hosted Docker Setup
on:
workflow_dispatch:
jobs:
test_docker_compose:
name: Test Docker Compose Setup
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Test docker-compose
working-directory: self-hosted/docker
env:
ACTIONS_USER_TIMEOUT_SECS: "20"
run: |
# Start services in the background
docker compose up -d
# Wait for services to be healthy and show logs while waiting
echo "Waiting for services to be healthy..."
attempt=1
max_attempts=30
while [ $attempt -le $max_attempts ]; do
if docker compose ps | grep -q "healthy"; then
echo "Services are healthy!"
break
fi
echo "Attempt $attempt/$max_attempts - Services not healthy yet"
echo "Docker compose status:"
docker compose ps
echo "Docker compose logs:"
docker compose logs --tail=50
sleep 2
attempt=$((attempt + 1))
done
if [ $attempt -gt $max_attempts ]; then
echo "Services failed to become healthy within timeout"
docker compose logs
exit 1
fi
# Give services a moment to fully initialize
sleep 5
echo "Testing backend version endpoint..."
curl -v http://localhost:3210/version || {
echo "Backend version check failed. Logs:"
docker compose logs
exit 1
}
echo "Testing dashboard endpoint..."
curl -v http://localhost:6791 || {
echo "Dashboard check failed. Logs:"
docker compose logs
exit 1
}
# Stop services
docker compose down