Skip to content

Instantly share code, notes, and snippets.

@marcelo-ochoa
Created May 22, 2018 14:49
Show Gist options
  • Save marcelo-ochoa/687d074f3e30aa7f2f9e2d328bc19db1 to your computer and use it in GitHub Desktop.
Save marcelo-ochoa/687d074f3e30aa7f2f9e2d328bc19db1 to your computer and use it in GitHub Desktop.
HAProxy stacks - rproxy DTICs load balancer- haproxy DC load balancer
version: '3.3'
services:
server:
image: dockercloud/haproxy:1.6.7
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- proxy_certs:/certs
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
networks:
- rproxy
environment:
- TZ=America/Argentina/Buenos_Aires
- TIMEOUT=connect 50000, client 50000, server 50000
- CERT_FOLDER="/certs/"
- RSYSLOG_DESTINATION=10.1.1.243
deploy:
mode: replicated
replicas: 2
placement:
constraints: [node.role == manager]
restart_policy:
condition: on-failure
max_attempts: 3
window: 120s
networks:
rproxy:
external:
name: reverse_proxy
version: '3.3'
services:
server:
image: dockercloud/haproxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- proxy_certs:/certs:ro
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
networks:
- rproxy
environment:
- TZ=America/Argentina/Buenos_Aires
- TIMEOUT=connect 50000, client 50000, server 50000
- CERT_FOLDER="/certs/"
- RSYSLOG_DESTINATION=10.1.1.242
deploy:
mode: replicated
replicas: 3
placement:
constraints: [node.role == manager]
restart_policy:
condition: on-failure
max_attempts: 3
window: 120s
networks:
rproxy:
external:
name: reverse_proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment