Revamp Swarm example documentation and streamline deployment instructions
- Consolidated and simplified Swarm example README to focus on YAML header comments for documentation. - Removed redundant and extended sections, replacing with concise steps for getting started. - Standardized YAML headers across `easyhaproxy.yml`, `services.yml`, and `portainer.yml` with a clearer and more readable format. - Enhanced user guidance for deployment, setup requirements, verification, and cleanup.
This commit is contained in:
parent
5397f0166e
commit
b9a9bee0b9
29 changed files with 1459 additions and 2861 deletions
|
|
@ -1,23 +1,49 @@
|
|||
# IP Whitelist Plugin Example
|
||||
# ==============================================================================
|
||||
# EXAMPLE: IP Whitelist Plugin
|
||||
# ==============================================================================
|
||||
#
|
||||
# This example demonstrates restricting access to specific IP addresses
|
||||
# WHAT THIS DEMONSTRATES:
|
||||
# - Restricting access to specific IP addresses or CIDR ranges
|
||||
# - Single IP, CIDR notation, and multiple IP support
|
||||
# - Custom HTTP status code for blocked requests
|
||||
# - Admin panel or sensitive application protection
|
||||
#
|
||||
# Prerequisites:
|
||||
# 1. Add to /etc/hosts:
|
||||
# 127.0.0.1 admin.local
|
||||
# REQUIREMENTS (run these first):
|
||||
# ```bash
|
||||
# # Add to /etc/hosts (idempotent)
|
||||
# grep -q "admin.local" /etc/hosts || echo "127.0.0.1 admin.local" | sudo tee -a /etc/hosts
|
||||
#
|
||||
# 2. Start the stack:
|
||||
# docker compose -f docker-compose-ip-whitelist.yml up -d
|
||||
# # IMPORTANT: Update the allowed_ips in this file (line 52) with your actual IPs!
|
||||
# # Default allows localhost and private networks for testing
|
||||
# ```
|
||||
#
|
||||
# 3. Test from localhost (127.0.0.1 is whitelisted):
|
||||
# curl http://admin.local/
|
||||
# # Response: Success (200 OK)
|
||||
# HOW TO START:
|
||||
# ```bash
|
||||
# docker compose -f docker-compose-ip-whitelist.yml up -d
|
||||
# ```
|
||||
#
|
||||
# 4. Test from non-whitelisted IP:
|
||||
# # You'll need to test from another machine or configure the example
|
||||
# # with your actual IP address in the allowed_ips label
|
||||
# HOW TO VERIFY IT'S WORKING:
|
||||
# ```bash
|
||||
# # Test from localhost (127.0.0.1 is whitelisted)
|
||||
# curl http://admin.local/
|
||||
# # Expected: 200 OK - Access granted
|
||||
#
|
||||
# Note: Update the allowed_ips label with your actual IP addresses/networks
|
||||
# # Test from non-whitelisted IP
|
||||
# # You'll need to test from another machine or temporarily remove your IP
|
||||
# # from the allowed_ips list to see the 403 Forbidden response
|
||||
#
|
||||
# # View HAProxy stats to see blocked requests
|
||||
# # URL: http://localhost:1936
|
||||
# # Username: admin
|
||||
# # Password: password
|
||||
# ```
|
||||
#
|
||||
# CLEAN UP:
|
||||
# ```bash
|
||||
# docker compose -f docker-compose-ip-whitelist.yml down
|
||||
# ```
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
services:
|
||||
haproxy:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue