# DocWell Test Stack A simple HTTP server stack for testing DocWell features. ## Overview This is a minimal Docker Compose stack that runs an Nginx web server. It's designed to be used for testing all DocWell features including: - Backup and restore operations - Stack management (start/stop/restart) - Image updates - Service migration - Volume management - Health checks ## Quick Start ### 1. Install the Stack ```bash # Copy to stacks directory (default: /opt/stacks) sudo cp -r test-stack /opt/stacks/ # Or use your configured stacks directory sudo cp -r test-stack /path/to/your/stacks/dir/ ``` ### 2. Start the Stack ```bash cd /opt/stacks/test-stack docker compose up -d ``` Or use DocWell: ```bash ./docwell --stack-start test-stack ``` ### 3. Verify It's Running ```bash # Check status docker compose ps # Or use DocWell ./docwell --stack-status test-stack # Access the web interface curl http://localhost:8080 # Or open in browser: http://localhost:8080 ``` ## Testing DocWell Features ### Backup Operations ```bash # Backup this stack ./docwell --backup-stack test-stack # Or backup all stacks ./docwell --backup ``` ### Stack Management ```bash # List all stacks ./docwell --stack-list # Start stack ./docwell --stack-start test-stack # Stop stack ./docwell --stack-stop test-stack # Restart stack ./docwell --stack-restart test-stack # View logs ./docwell --stack-logs test-stack ``` ### Update Operations ```bash # Check for updates ./docwell --update-check # Update this stack ./docwell --update-stack test-stack # Update all stacks ./docwell --update-all ``` ### Migration Testing ```bash # Migrate to another server ./docwell --migrate \ --migrate-service test-stack \ --migrate-source local \ --migrate-dest user@remote-host \ --migrate-method rsync ``` ## Stack Details - **Service**: Nginx web server - **Image**: `nginx:alpine` (lightweight) - **Port**: 8080 (host) → 80 (container) - **Volume**: `web_data` (persistent cache storage) - **Health Check**: Enabled (checks every 30s) ## Files - `compose.yaml` - Docker Compose configuration - `html/index.html` - Web interface served by Nginx - `README.md` - This file ## Customization ### Change Port Edit `compose.yaml`: ```yaml ports: - "9090:80" # Change 8080 to your desired port ``` ### Change Image Version Edit `compose.yaml`: ```yaml image: nginx:latest # or nginx:1.25, etc. ``` ### Add More Services You can add additional services to test more complex scenarios: ```yaml services: web: # ... existing config ... db: image: postgres:alpine # ... database config ... ``` ## Cleanup To remove the test stack: ```bash # Stop and remove cd /opt/stacks/test-stack docker compose down -v # Remove directory sudo rm -rf /opt/stacks/test-stack ``` ## Troubleshooting ### Port Already in Use If port 8080 is already in use, change it in `compose.yaml`: ```yaml ports: - "8081:80" # Use different port ``` ### Permission Issues Ensure the stacks directory is accessible: ```bash sudo chown -R $USER:$USER /opt/stacks/test-stack ``` ### Container Won't Start Check logs: ```bash docker compose logs # Or ./docwell --stack-logs test-stack ``` ## Notes - This stack uses a named volume (`web_data`) to test volume migration features - The health check ensures the service is actually running, not just started - The web interface shows real-time information about the stack