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