Skip to content

refactor recursive optimization for map operations #54

refactor recursive optimization for map operations

refactor recursive optimization for map operations #54

Workflow file for this run

name: Docker CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
docker-build-test:
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4
- name: Remove .env copy from Dockerfile
run: sed -i '/COPY .env/d' Dockerfile
- name: Build Docker image
run: |
if ! docker build -t docetl .; then
echo "Docker build failed"
exit 1
fi
- name: Create Docker volume
run: docker volume create docetl-data
- name: Test Docker container
run: |
# Run the container in detached mode
docker run -d \
-p 3000:3000 \
-p 8000:8000 \
-v docetl-data:/docetl-data \
-e FRONTEND_HOST=0.0.0.0 \
-e FRONTEND_PORT=3000 \
-e BACKEND_HOST=0.0.0.0 \
-e BACKEND_PORT=8000 \
--name docetl-test \
docetl
# Wait for initial startup
echo "Waiting for container to start..."
sleep 30
# Check container health for up to 3 minutes
for i in {1..6}; do
if ! docker ps -q -f name=docetl-test > /dev/null 2>&1; then
echo "Container stopped unexpectedly"
docker logs docetl-test
exit 1
fi
# Try to curl the frontend
if curl -s -f http://localhost:3000 > /dev/null; then
echo "Frontend is responding"
break
fi
if [ $i -eq 6 ]; then
echo "Container health check failed after 3 minutes"
docker logs docetl-test
exit 1
fi
echo "Waiting for services to be ready... (attempt $i/6)"
sleep 30
done
# If we get here, container is running and healthy
echo "Container is running successfully"
# Cleanup
docker stop docetl-test
docker rm docetl-test
- name: Clean up Docker volume
run: docker volume rm docetl-data