roles/haproxy: fix issues
This commit is contained in:
parent
ff40949ff7
commit
e0b7c5a15e
@ -16,7 +16,7 @@ services:
|
||||
- GITEA__server__SSH_DOMAIN={{ gitea_domain }}
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "2499:22"
|
||||
- "2498:22"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- {{ dataroot }}/gitea:/data
|
||||
|
@ -9,6 +9,7 @@
|
||||
template:
|
||||
src: haproxy.cfg.j2
|
||||
dest: /etc/haproxy/haproxy.cfg
|
||||
lstrip_blocks: true
|
||||
|
||||
- name: Enable haproxy service
|
||||
systemd:
|
||||
|
@ -4,19 +4,23 @@ defaults
|
||||
timeout connect 10s
|
||||
timeout client 36h
|
||||
timeout server 36h
|
||||
balance leastconn
|
||||
|
||||
{% if groups["gitea"] | length > 0 %}
|
||||
|
||||
listen gitea_ssh
|
||||
bind *:2499
|
||||
balance leastconn
|
||||
mode tcp
|
||||
|
||||
option tcp-check
|
||||
tcp-check expect rstring SSH-2.0-OpenSSH.*
|
||||
|
||||
{% for host in groups["gitea"] %}
|
||||
server {{ host }} {{ hostvars[host]["local_ip"] }}:2499
|
||||
server {{ host }} {{ host }}:2498
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if groups["syncthing"] | length > 0 and "syncthing" not in group_names %}
|
||||
listen syncthing
|
||||
bind *:22000
|
||||
{% for host in groups["syncthing"] %}
|
||||
server {{ host }} {{ host }}:22000
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user