Resolve healthcheck issues around domain splitting with an index route
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-07-24 10:39:29 -03:00
parent 5a1fe0dc8e
commit e264213392
2 changed files with 5 additions and 1 deletions

4
app.py
View File

@@ -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]

View File

@@ -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