fix order of acls and backends, put db in volume
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
f51498a3b2
commit
32498f1a04
@ -9,7 +9,7 @@ import psutil
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
DB_FILE = 'haproxy_config.db'
|
||||
DB_FILE = '/etc/haproxy/haproxy_config.db'
|
||||
TEMPLATE_DIR = Path('templates')
|
||||
HAPROXY_CONFIG_PATH = '/etc/haproxy/haproxy.cfg'
|
||||
SSL_CERTS_DIR = '/etc/haproxy/certs'
|
||||
@ -123,7 +123,7 @@ def health_check():
|
||||
'error': str(e)
|
||||
}), 500
|
||||
|
||||
@app.route('/regenerate', methods=['GET'])
|
||||
@app.route('/api/regenerate', methods=['GET'])
|
||||
def regenerate_conf():
|
||||
try:
|
||||
generate_config()
|
||||
@ -336,6 +336,9 @@ def generate_config():
|
||||
|
||||
# Add ACLS
|
||||
config_parts.append('\n' .join(config_acls))
|
||||
# Add LetsEncrypt Backend
|
||||
letsencrypt_backend = template_env.get_template('hap_letsencrypt_backend.tpl').render()
|
||||
config_parts.append(letsencrypt_backend)
|
||||
# Add Backends
|
||||
config_parts.append('\n' .join(config_backends))
|
||||
# Write complete configuration to tmp
|
||||
|
@ -1,9 +1,3 @@
|
||||
#Let's Encrypt SSL
|
||||
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
|
||||
use_backend letsencrypt-backend if letsencrypt-acl
|
||||
|
||||
|
||||
#Pass SSL Requests to Lets Encrypt
|
||||
backend letsencrypt-backend
|
||||
server letsencrypt 127.0.0.1:8688
|
||||
|
||||
|
4
templates/hap_letsencypt_backend.tpl
Normal file
4
templates/hap_letsencypt_backend.tpl
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
#Pass SSL Requests to Lets Encrypt
|
||||
backend letsencrypt-backend
|
||||
server letsencrypt 127.0.0.1:8688
|
Loading…
x
Reference in New Issue
Block a user