# Testing Instructions ## Prerequisites 1. **Start Docker Desktop** - Make sure Docker Desktop is running on your Windows machine 2. **Verify Docker is running**: ```powershell docker ps ``` This should not show an error. ## Step 1: Start the Services From the project root directory: ```powershell docker compose -f deploy/local/docker-compose.yml up --build ``` Or to run in detached mode (background): ```powershell docker compose -f deploy/local/docker-compose.yml up --build -d ``` ## Step 2: Verify Services are Running Check that all containers are running: ```powershell docker compose -f deploy/local/docker-compose.yml ps ``` You should see three services: - `evrak-postgres` (healthy) - `evrak-backend` (running) - `evrak-frontend` (running) ## Step 3: Check Logs View logs to ensure everything started correctly: ```powershell # All services docker compose -f deploy/local/docker-compose.yml logs # Specific service docker compose -f deploy/local/docker-compose.yml logs backend docker compose -f deploy/local/docker-compose.yml logs postgres ``` ## Step 4: Test the API ### Test Backend Health ```powershell curl http://localhost:3000 ``` ### Create a Tenant ```powershell curl -X POST http://localhost:3000/tenants -H "Content-Type: application/json" -d "{\"name\":\"Test Tenant\"}" ``` ### Create a Project ```powershell curl -X POST http://localhost:3000/projects -H "Content-Type: application/json" -d "{\"name\":\"Test Project\",\"tenant_id\":\"00000000-0000-0000-0000-000000000001\",\"path\":\"test_project\"}" ``` ### Get All Projects ```powershell curl http://localhost:3000/projects ``` ## Step 5: Access the Frontend Open your browser and navigate to: - **Frontend**: http://localhost - **Backend API**: http://localhost:3000 ## Step 6: Stop Services When done testing: ```powershell docker compose -f deploy/local/docker-compose.yml down ``` To also remove volumes (database data): ```powershell docker compose -f deploy/local/docker-compose.yml down -v ``` ## Troubleshooting ### Docker Desktop Not Running - Start Docker Desktop from Windows Start Menu - Wait for it to fully start (whale icon in system tray should be steady) ### Port Already in Use - Check if ports 80, 3000, or 5432 are already in use - Stop conflicting services or change ports in docker-compose.yml ### Database Connection Issues - Wait a few seconds after starting for database to initialize - Check postgres logs: `docker compose -f deploy/local/docker-compose.yml logs postgres` ### Build Errors - Make sure you're in the project root directory - Try: `docker compose -f deploy/local/docker-compose.yml build --no-cache`