diff --git a/deploy/docker/docker-compose.yml b/deploy/docker/docker-compose.yml index 96aaddd..26df7b8 100644 --- a/deploy/docker/docker-compose.yml +++ b/deploy/docker/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3" - services: easyhaproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/docs/container-labels.md b/docs/container-labels.md index 6e634c9..b791457 100644 --- a/docs/container-labels.md +++ b/docs/container-labels.md @@ -69,8 +69,6 @@ docker run \ If you are using docker-compose you can use this way: ```yaml -version: "3" - services: mycontainer: image: some/myimage @@ -102,8 +100,6 @@ EasyHAProxy supports FastCGI protocol for PHP-FPM and other FastCGI applications #### Using Unix Socket ```yaml title="PHP-FPM with Unix socket" -version: "3" - services: php-fpm: image: php:8.2-fpm @@ -119,8 +115,6 @@ services: #### Using TCP Connection ```yaml title="PHP-FPM with TCP connection" -version: "3" - services: php-fpm: image: php:8.2-fpm diff --git a/docs/swarm.md b/docs/swarm.md index 348224e..52aeb9e 100644 --- a/docs/swarm.md +++ b/docs/swarm.md @@ -31,8 +31,6 @@ docker network create -d overlay --attachable easyhaproxy And then deploy the EasyHAProxy stack: ```yaml -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 @@ -76,8 +74,6 @@ Mapping to `/var/run/docker.sock` is necessary to discover the docker containers To make your containers "discoverable" by EasyHAProxy, that is the minimum configuration you need: ```yaml -version: "3" - services: container: image: my/image:tag diff --git a/examples/docker/README.md b/examples/docker/README.md index 8ebbb67..04085ff 100644 --- a/examples/docker/README.md +++ b/examples/docker/README.md @@ -172,6 +172,11 @@ curl -I -H "Host: google.helloworld.com" localhost:19901 - Running Portainer behind EasyHAProxy - Real-world application example +**Usage:** +```bash +docker compose -f docker-compose-portainer.yml up -d +``` + **Access Portainer:** - URL: http://portainer.local (add to `/etc/hosts` or use real DNS) - First time: Create admin user @@ -184,6 +189,11 @@ curl -I -H "Host: google.helloworld.com" localhost:19901 - Multiple applications behind EasyHAProxy - Portainer + custom app setup +**Usage:** +```bash +docker compose -f docker-compose-portainer-app-example.yml up -d +``` + --- ## Plugin Examples @@ -212,8 +222,6 @@ Run PHP applications with FastCGI protocol support: **Configuration:** ```yaml -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 @@ -304,8 +312,6 @@ The `php-app/` directory contains: Protect your API with JWT token validation: ```yaml -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 @@ -370,8 +376,6 @@ openssl rsa -in jwt_private.pem -pubout -out jwt_pubkey.pem Restore original visitor IPs when using Cloudflare CDN: ```yaml -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 @@ -413,8 +417,6 @@ curl https://www.cloudflare.com/ips-v6 >> cloudflare_ips.lst Restrict access to specific IP addresses: ```yaml -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 @@ -460,8 +462,6 @@ curl http://admin.example.com Combine multiple plugins for enhanced security: ```yaml -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/docker/docker-compose-acme.yml b/examples/docker/docker-compose-acme.yml index 79cbebd..495ac45 100644 --- a/examples/docker/docker-compose-acme.yml +++ b/examples/docker/docker-compose-acme.yml @@ -4,8 +4,6 @@ # - public IP pointing your machine # - open ports 80 and 443 in your firewall -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/docker/docker-compose-changed-label.yml b/examples/docker/docker-compose-changed-label.yml index b5f7259..94d1253 100644 --- a/examples/docker/docker-compose-changed-label.yml +++ b/examples/docker/docker-compose-changed-label.yml @@ -4,8 +4,6 @@ # or add to /etc/hosts # 127.0.0.1 host1.local -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/docker/docker-compose-cloudflare.yml b/examples/docker/docker-compose-cloudflare.yml index fc2a14a..79c7518 100644 --- a/examples/docker/docker-compose-cloudflare.yml +++ b/examples/docker/docker-compose-cloudflare.yml @@ -24,8 +24,6 @@ # Without Cloudflare, the request won't come from Cloudflare IPs, so the plugin # won't activate. This example is for demonstration and testing purposes. -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/docker/docker-compose-ip-whitelist.yml b/examples/docker/docker-compose-ip-whitelist.yml index e4b28b3..87be787 100644 --- a/examples/docker/docker-compose-ip-whitelist.yml +++ b/examples/docker/docker-compose-ip-whitelist.yml @@ -19,8 +19,6 @@ # # Note: Update the allowed_ips label with your actual IP addresses/networks -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/docker/docker-compose-jwt-validator.yml b/examples/docker/docker-compose-jwt-validator.yml index 1a304a9..b5e4b70 100644 --- a/examples/docker/docker-compose-jwt-validator.yml +++ b/examples/docker/docker-compose-jwt-validator.yml @@ -27,8 +27,6 @@ # curl -H "Authorization: Bearer $TOKEN" http://api.local/ # # Response: Success -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/docker/docker-compose-multi-containers.yml b/examples/docker/docker-compose-multi-containers.yml index 3f07803..92181bf 100644 --- a/examples/docker/docker-compose-multi-containers.yml +++ b/examples/docker/docker-compose-multi-containers.yml @@ -7,8 +7,6 @@ # content-length: 0 # location: www.google.com/ -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/docker/docker-compose-php-fpm.yml b/examples/docker/docker-compose-php-fpm.yml index 8c030c6..c8e8737 100644 --- a/examples/docker/docker-compose-php-fpm.yml +++ b/examples/docker/docker-compose-php-fpm.yml @@ -21,8 +21,6 @@ # - PATH_INFO support for routing # - Custom FastCGI parameters -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/docker/docker-compose-plugins-combined.yml b/examples/docker/docker-compose-plugins-combined.yml index 742b554..7fd26f1 100644 --- a/examples/docker/docker-compose-plugins-combined.yml +++ b/examples/docker/docker-compose-plugins-combined.yml @@ -29,8 +29,6 @@ # # Admin panel (IP whitelist only) # curl http://admin.local/ # Success from localhost -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/docker/docker-compose-portainer-app-example.yml b/examples/docker/docker-compose-portainer-app-example.yml index 99c9ed1..2c2f105 100644 --- a/examples/docker/docker-compose-portainer-app-example.yml +++ b/examples/docker/docker-compose-portainer-app-example.yml @@ -1,5 +1,3 @@ -version: "3" - services: container: image: byjg/static-httpserver diff --git a/examples/docker/docker-compose-portainer.yml b/examples/docker/docker-compose-portainer.yml index 140e656..5f23d90 100644 --- a/examples/docker/docker-compose-portainer.yml +++ b/examples/docker/docker-compose-portainer.yml @@ -4,8 +4,6 @@ # docker network create easyhaproxy -version: "3" - services: easyhaproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/docker/docker-compose.yml b/examples/docker/docker-compose.yml index 8894a4b..ad82ed4 100644 --- a/examples/docker/docker-compose.yml +++ b/examples/docker/docker-compose.yml @@ -15,8 +15,6 @@ # Test SSL: # openssl s_client -showcerts -connect 127.0.0.1:443 -servername host1.local -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/static/docker-compose.yml b/examples/static/docker-compose.yml index 809379b..49c1dc8 100644 --- a/examples/static/docker-compose.yml +++ b/examples/static/docker-compose.yml @@ -1,8 +1,6 @@ # To test: # curl -k -H "Host: host1.local" https://127.0.0.1/ -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/swarm/README.md b/examples/swarm/README.md index 5627b0f..f0fce59 100644 --- a/examples/swarm/README.md +++ b/examples/swarm/README.md @@ -104,8 +104,6 @@ docker stack deploy -c portainer.yml portainer ### easyhaproxy.yml ```yaml -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 @@ -152,8 +150,6 @@ Service labels are similar to container labels but applied to **services**, not ### Basic Service Example ```yaml -version: "3" - services: webapp: image: nginx:alpine @@ -188,8 +184,6 @@ labels: ### Use Case 1: Simple HTTP Service ```yaml -version: "3" - services: myapp: image: my-app:latest @@ -215,8 +209,6 @@ docker stack deploy -c myapp.yml myapp ### Use Case 2: HTTPS with Let's Encrypt ```yaml -version: "3" - services: secure-app: image: secure-app:latest @@ -296,8 +288,6 @@ services: ### Use Case 5: Multiple Services with Load Balancing ```yaml -version: "3" - services: frontend: image: frontend-app:latest @@ -349,8 +339,6 @@ networks: Secure your API with JWT token validation in Swarm: ```yaml -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 @@ -421,8 +409,6 @@ curl -H "Authorization: Bearer eyJhbGc..." http://api.example.com/users Restore original visitor IPs in Swarm environment: ```yaml -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 @@ -480,8 +466,6 @@ docker stack deploy -c cloudflare-stack.yml myapp Restrict admin panel to specific IPs in Swarm: ```yaml -version: "3" - services: admin: image: admin-panel:latest @@ -522,8 +506,6 @@ curl http://admin.example.com Production-ready setup with multiple security layers: ```yaml -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 @@ -750,7 +732,7 @@ Place certificate files: docker secret create example_com_cert ./example.com.pem # Use in stack -version: "3" + services: haproxy: secrets: diff --git a/examples/swarm/easyhaproxy.yml b/examples/swarm/easyhaproxy.yml index 3238896..cb9e967 100644 --- a/examples/swarm/easyhaproxy.yml +++ b/examples/swarm/easyhaproxy.yml @@ -3,8 +3,6 @@ # docker stack deploy -c easyhaproxy.yml easyhaproxy -version: "3" - services: haproxy: image: byjg/easy-haproxy:4.6.0 diff --git a/examples/swarm/portainer.yml b/examples/swarm/portainer.yml index d259988..aa4f4fc 100644 --- a/examples/swarm/portainer.yml +++ b/examples/swarm/portainer.yml @@ -1,8 +1,6 @@ # To install: # docker stack deploy -c portainer.yml portainer -version: "3" - services: portainer: image: portainer/portainer-ce:latest diff --git a/examples/swarm/services.yml b/examples/swarm/services.yml index ad16ce2..fc9ac69 100644 --- a/examples/swarm/services.yml +++ b/examples/swarm/services.yml @@ -18,8 +18,6 @@ # Test SSL: # openssl s_client -showcerts -connect 127.0.0.1:443 -servername host1.local -version: "3" - services: container: image: byjg/static-httpserver