fix: resolve CodiMD startup warnings

- Fix health check endpoint from /healthz to / (root path)
- Add CMD_DOMAIN environment variable to resolve domain warning
- Add CMD_URL_ADDPORT and CMD_PROTOCOL_USESSL configuration
- Update .env.example with domain configuration examples

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 15:12:04 +08:00
parent 9b73c810e6
commit 05f853d270
2 changed files with 13 additions and 1 deletions

View File

@@ -33,6 +33,9 @@ services:
container_name: codimd-app
environment:
- CMD_DB_URL=${CMD_DB_URL}
- CMD_DOMAIN=${CMD_DOMAIN}
- CMD_URL_ADDPORT=${CMD_URL_ADDPORT}
- CMD_PROTOCOL_USESSL=${CMD_PROTOCOL_USESSL}
- CMD_USECDN=false
- CMD_SESSION_SECRET=${CMD_SESSION_SECRET}
- CMD_SESSION_LIFETIME=1209600000
@@ -46,7 +49,7 @@ services:
- ./upload-data:/home/hackmd/app/public/uploads
restart: always
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/healthz"]
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3