1
0
Fork 0
docker-easy-haproxy/tests_e2e/docker/docker-compose-proxy-headers.yml
Joao Gilberto Magalhaes 48f6e1f783 Migrate build assets and scripts to deploy/docker structure
- Removed `install.sh` and moved Docker-related assets to `deploy/docker`.
- Updated all Dockerfile references from `build/` to `deploy/docker/`.
- Refactored paths in E2E tests, Makefile, and documentation for consistency with new directory structure.
- Added `HAPROXY_STATS_CORS_ORIGIN` environment variable in `docker-compose.yml`.
2026-02-18 02:58:32 -05:00

46 lines
1.5 KiB
YAML

# ==============================================================================
# E2E TEST: Proxy Headers Verification
# ==============================================================================
#
# WHAT THIS DEMONSTRATES:
# - All 5 standard proxy headers are set correctly
# - X-Forwarded-For: Client IP address
# - X-Forwarded-Port: Port HAProxy received request on
# - X-Forwarded-Proto: Protocol (http or https)
# - X-Forwarded-Host: Original Host header from client
# - X-Request-ID: Unique request identifier (UUID)
# - HAProxy logs contain unique-id for request correlation
#
# ==============================================================================
services:
haproxy:
build:
context: ../..
dockerfile: deploy/docker/Dockerfile
image: byjg/easy-haproxy:local
volumes:
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: ["CMD", "curl", "-f", "-u", "admin:password", "http://localhost:1936"]
interval: 10s
timeout: 5s
start_period: 30s
retries: 3
environment:
EASYHAPROXY_DISCOVER: docker
HAPROXY_USERNAME: admin
HAPROXY_PASSWORD: password
HAPROXY_STATS_PORT: 1936
ports:
- "80:80/tcp"
- "443:443/tcp"
- "1936:1936/tcp"
# Header echo server for testing - responds with all received headers
webapp:
build: ../fixtures/header-echo
labels:
easyhaproxy.http.host: test.local
easyhaproxy.http.port: 80
easyhaproxy.http.localport: 8080