Fix Templates from causing errors with haproxy when added, Fix add notice when haproxy fails check
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 38s
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 38s
This commit is contained in:
parent
c951103b3b
commit
ff529be07f
@ -174,9 +174,9 @@ def request_ssl():
|
||||
|
||||
# Request Let's Encrypt certificate
|
||||
result = subprocess.run([
|
||||
'certbot', 'certonly', '--standalone',
|
||||
'--preferred-challenges', 'http',
|
||||
'-d', domain, '--non-interactive --http-01-port=8688'
|
||||
'certbot', 'certonly', '-n', '--standalone',
|
||||
'--preferred-challenges', 'http', '--http-01-port=8688',
|
||||
'-d', domain
|
||||
])
|
||||
|
||||
if result.returncode == 0:
|
||||
@ -364,7 +364,11 @@ def generate_config():
|
||||
capture_output=True,
|
||||
text=True
|
||||
)
|
||||
print("HAProxy started successfully")
|
||||
if result.returncode == 0:
|
||||
print("HAProxy started successfully")
|
||||
else:
|
||||
print(f"HAProxy start command returned: {result.stdout}")
|
||||
print(f"Error output: {result.stderr}")
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Failed to start HAProxy: {e.stdout}\n{e.stderr}")
|
||||
raise
|
||||
@ -383,7 +387,11 @@ def start_haproxy():
|
||||
capture_output=True,
|
||||
text=True
|
||||
)
|
||||
print("HAProxy started successfully")
|
||||
if result.returncode == 0:
|
||||
print("HAProxy started successfully")
|
||||
else:
|
||||
print(f"HAProxy start command returned: {result.stdout}")
|
||||
print(f"Error output: {result.stderr}")
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Failed to start HAProxy: {e.stdout}\n{e.stderr}")
|
||||
raise
|
||||
|
@ -3,4 +3,5 @@ backend {{ name }}-backend
|
||||
option forwardfor
|
||||
http-request add-header X-CLIENT-IP %[src]
|
||||
{% if ssl_enabled %}http-request set-header X-Forwarded-Proto https if { ssl_fc }{% endif %}
|
||||
{% for server in servers %}server {{ server.server_name }} {{ server.server_address }}:{{ server.server_port }} {{ server.server_options }}{% endfor %}
|
||||
{% for server in servers %}server {{ server.server_name }} {{ server.server_address }}:{{ server.server_port }} {{ server.server_options }}{% endfor %}
|
||||
|
@ -45,4 +45,5 @@ defaults
|
||||
timeout server 10m
|
||||
timeout http-keep-alive 120s
|
||||
timeout check 10s
|
||||
maxconn 3000
|
||||
maxconn 3000
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
#Pass SSL Requests to Lets Encrypt
|
||||
backend letsencrypt-backend
|
||||
server letsencrypt 127.0.0.1:8688
|
||||
server letsencrypt 127.0.0.1:8688
|
||||
|
Loading…
x
Reference in New Issue
Block a user