From aef8674650178bc1ecac0f487301901516841147 Mon Sep 17 00:00:00 2001 From: kubo Date: Sun, 4 Nov 2018 01:22:17 +0100 Subject: [PATCH] Closes #247 Add healthcheck --- src/main/resources/config/application-dev.yml | 12 +++++++++++- src/main/resources/config/application-prod.yml | 11 +++++++++++ src/main/resources/config/application.yml | 12 ++++++++---- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 94dca97fa..7c405ce76 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -58,7 +58,17 @@ spring: password: ${DATABASE_PASSWORD:banana} jpa: show-sql: true - + boot: + admin: + client: + url: ${ADMIN_SERVER_URL:http://localhost:8030} + username: ${ADMIN_SERVER_USERNAME:admin} + password: ${ADMIN_SERVER_PASSWORD:banana} + instance: + metadata: + user: + name: ${ADMIN_CLIENT_USERNAME:faf-java-api} + password: ${ADMIN_CLIENT_PASSWORD:banana} logging: level: com.faforever.api: trace diff --git a/src/main/resources/config/application-prod.yml b/src/main/resources/config/application-prod.yml index 5f2e5788b..dabd06f4e 100644 --- a/src/main/resources/config/application-prod.yml +++ b/src/main/resources/config/application-prod.yml @@ -60,6 +60,17 @@ spring: password: ${DATABASE_PASSWORD} jpa: show-sql: false + boot: + admin: + client: + url: ${ADMIN_SERVER_URL} + username: ${ADMIN_SERVER_USERNAME} + password: ${ADMIN_SERVER_PASSWORD} + instance: + metadata: + user: + name: ${ADMIN_CLIENT_USERNAME} + password: ${ADMIN_CLIENT_PASSWORD} logging: path: ${LOG_FILE_DIRECTORY:/tmp} diff --git a/src/main/resources/config/application.yml b/src/main/resources/config/application.yml index 126b3bfc2..6b738917d 100644 --- a/src/main/resources/config/application.yml +++ b/src/main/resources/config/application.yml @@ -69,10 +69,14 @@ server: max-http-post-size: 314572800 management: - port: 8011 - security: - enabled: false - + server: + port: ${MANAGEMENT_PORT:8011} + address: ${MANAGEMENT_ADDRESS:} + endpoints: + web: + base-path: ${MANAGEMENT_BASE_PATH:/manage} + exposure: + include: '*' logging: level: com.faforever: ${LOG_LEVEL:info}