|
| 1 | +version: '3.7' |
| 2 | + |
| 3 | +services: |
| 4 | + reverse-proxy: |
| 5 | + image: dockerflow/docker-flow-proxy:18.09.14-9-linux-amd64 |
| 6 | + environment: |
| 7 | + # daemon config |
| 8 | + - LISTENER_ADDRESS=swarm-listener |
| 9 | + - SERVICE_NAME=reverse-proxy |
| 10 | + - RECONFIGURE_ATTEMPTS=20 |
| 11 | + - RELOAD_ATTEMPTS=5 |
| 12 | + - RELOAD_INTERVAL=5000 |
| 13 | + - REPEAT_RELOAD=false |
| 14 | + |
| 15 | + - HTTPS_ONLY=true |
| 16 | + - SSL_BIND_CIPHERS=ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:EECDH+AESGCM:EDH+AESGCM |
| 17 | + - SSL_BIND_OPTIONS=ssl-min-ver TLSv1.0 no-tls-tickets |
| 18 | + - CONNECTION_MODE=http-server-close |
| 19 | + - COMPRESSION_ALGO=gzip |
| 20 | + - EXTRA_GLOBAL=crt-base /certs |
| 21 | + |
| 22 | + - DEFAULT_PORTS=80,443:ssl |
| 23 | + - DEFAULT_REQ_MODE=http |
| 24 | + - ENABLE_H2=true |
| 25 | + - SERVICE_DOMAIN_ALGO=hdr_dom(host) |
| 26 | + - TIMEOUT_CLIENT=600 |
| 27 | + - TIMEOUT_CONNECT=5 |
| 28 | + - TIMEOUT_QUEUE=60 |
| 29 | + - TIMEOUT_SERVER=3600 |
| 30 | + - TIMEOUT_TUNNEL=3600 |
| 31 | + - TIMEOUT_HTTP_REQUEST=5 |
| 32 | + - TIMEOUT_HTTP_KEEP_ALIVE=30 |
| 33 | + |
| 34 | + - SKIP_ADDRESS_VALIDATION=true |
| 35 | + - RESOLVERS=nameserver dns-0 9.9.9.9:53,nameserver dns-1 8.8.8.8:53 |
| 36 | + - CHECK_RESOLVERS=false |
| 37 | + - DO_NOT_RESOLVE_ADDR=false |
| 38 | + networks: |
| 39 | + swarm-listener: |
| 40 | + aliases: |
| 41 | + - reverse-proxy |
| 42 | + - reverse-proxy.docker |
| 43 | + - reverse-proxy.global.docker |
| 44 | + global_reverse-proxy: |
| 45 | + org1_reverse-proxy: |
| 46 | + org2_reverse-proxy: |
| 47 | + ports: |
| 48 | + - 80:80 |
| 49 | + - 443:443 |
| 50 | + volumes: |
| 51 | + - /etc/localtime:/etc/localtime:ro |
| 52 | + - /srv/global/reverse-proxy/certs:/certs |
| 53 | + deploy: |
| 54 | + labels: |
| 55 | + - com.df.notify=true |
| 56 | + - com.df.alertName=memlimit |
| 57 | + - com.df.alertIf=@service_mem_limit:0.8 |
| 58 | + - com.df.alertFor=30s |
| 59 | + mode: global |
| 60 | + update_config: |
| 61 | + parallelism: 1 |
| 62 | + delay: 10s |
| 63 | + resources: |
| 64 | + reservations: |
| 65 | + memory: 20M |
| 66 | + limits: |
| 67 | + memory: 50M |
| 68 | + |
| 69 | + swarm-listener: |
| 70 | + image: dockerflow/docker-flow-swarm-listener:18.09.06-6-linux-amd64 |
| 71 | + networks: |
| 72 | + - swarm-listener |
| 73 | + volumes: |
| 74 | + - /etc/localtime:/etc/localtime:ro |
| 75 | + - /var/run/docker.sock:/var/run/docker.sock |
| 76 | + environment: |
| 77 | + - DF_NOTIFY_CREATE_SERVICE_URL=http://reverse-proxy.docker:8080/v1/docker-flow-proxy/reconfigure |
| 78 | + - DF_NOTIFY_REMOVE_SERVICE_URL=http://reverse-proxy.docker:8080/v1/docker-flow-proxy/remove |
| 79 | + deploy: |
| 80 | + mode: global |
| 81 | + labels: |
| 82 | + - com.df.notify=true |
| 83 | + - com.df.distribute=true |
| 84 | + - com.df.alertName=memlimit |
| 85 | + - com.df.alertIf=@service_mem_limit:0.8 |
| 86 | + - com.df.alertFor=30s |
| 87 | + placement: |
| 88 | + constraints: [node.role == manager] |
| 89 | + restart_policy: |
| 90 | + condition: on-failure |
| 91 | + delay: 3s |
| 92 | + resources: |
| 93 | + reservations: |
| 94 | + memory: 10M |
| 95 | + limits: |
| 96 | + memory: 20M |
| 97 | + |
| 98 | +networks: |
| 99 | + swarm-listener: |
| 100 | + driver: overlay |
| 101 | + attachable: false |
| 102 | + global_reverse-proxy: |
| 103 | + name: global_reverse-proxy |
| 104 | + driver: overlay |
| 105 | + attachable: true |
| 106 | + org1_reverse-proxy: |
| 107 | + name: org1_reverse-proxy |
| 108 | + driver: overlay |
| 109 | + attachable: true |
| 110 | + org2_reverse-proxy: |
| 111 | + name: org2_reverse-proxy |
| 112 | + driver: overlay |
| 113 | + attachable: true |
0 commit comments