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
|
# Request Let's Encrypt certificate
|
||||||
result = subprocess.run([
|
result = subprocess.run([
|
||||||
'certbot', 'certonly', '--standalone',
|
'certbot', 'certonly', '-n', '--standalone',
|
||||||
'--preferred-challenges', 'http',
|
'--preferred-challenges', 'http', '--http-01-port=8688',
|
||||||
'-d', domain, '--non-interactive --http-01-port=8688'
|
'-d', domain
|
||||||
])
|
])
|
||||||
|
|
||||||
if result.returncode == 0:
|
if result.returncode == 0:
|
||||||
@ -364,7 +364,11 @@ def generate_config():
|
|||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=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:
|
except subprocess.CalledProcessError as e:
|
||||||
print(f"Failed to start HAProxy: {e.stdout}\n{e.stderr}")
|
print(f"Failed to start HAProxy: {e.stdout}\n{e.stderr}")
|
||||||
raise
|
raise
|
||||||
@ -383,7 +387,11 @@ def start_haproxy():
|
|||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=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:
|
except subprocess.CalledProcessError as e:
|
||||||
print(f"Failed to start HAProxy: {e.stdout}\n{e.stderr}")
|
print(f"Failed to start HAProxy: {e.stdout}\n{e.stderr}")
|
||||||
raise
|
raise
|
||||||
|
@ -4,3 +4,4 @@ backend {{ name }}-backend
|
|||||||
http-request add-header X-CLIENT-IP %[src]
|
http-request add-header X-CLIENT-IP %[src]
|
||||||
{% if ssl_enabled %}http-request set-header X-Forwarded-Proto https if { ssl_fc }{% endif %}
|
{% 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 %}
|
||||||
|
|
@ -46,3 +46,4 @@ defaults
|
|||||||
timeout http-keep-alive 120s
|
timeout http-keep-alive 120s
|
||||||
timeout check 10s
|
timeout check 10s
|
||||||
maxconn 3000
|
maxconn 3000
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user