Resolve healthcheck issues around domain splitting with an index route
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
4
app.py
4
app.py
@@ -7,6 +7,10 @@ env = jinja2.Environment(
|
||||
autoescape=jinja2.select_autoescape(['xml'])
|
||||
)
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return "Mail Autoconfig Service is running."
|
||||
|
||||
@app.route('/mail/config-v1.1.xml')
|
||||
def thunderbird_config():
|
||||
domain = request.host.split('.', 1)[1]
|
||||
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
container_name: mail-autoconfig
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:80/mail/config-v1.1.xml')"]
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:80/')"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
Reference in New Issue
Block a user