chore: use SERVER_PORT env var for listening port (#2018)

This commit is contained in:
James Ward
2026-07-15 22:23:23 -06:00
committed by GitHub
parent 15446a8965
commit 74642c1023
3 changed files with 4 additions and 6 deletions
+2 -4
View File
@@ -123,12 +123,10 @@ LABEL org.opencontainers.image.title="Grimmory" \
ENV APP_VERSION=${APP_VERSION} \
APP_REVISION=${APP_REVISION}
ARG BOOKLORE_PORT=6060
ENV BOOKLORE_PORT=${BOOKLORE_PORT}
EXPOSE ${BOOKLORE_PORT}
EXPOSE 6060
HEALTHCHECK --interval=60s --timeout=10s --start-period=60s --retries=5 \
CMD wget -q --spider http://localhost:${BOOKLORE_PORT}/api/v1/healthcheck
CMD wget -q --spider http://localhost:${SERVER_PORT:-${BOOKLORE_PORT:-6060}}/api/v1/healthcheck
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["java", "--enable-native-access=ALL-UNNAMED", "--enable-preview", "-jar", "/app/app.jar"]
+1 -1
View File
@@ -24,7 +24,7 @@ app:
server:
forward-headers-strategy: native
port: ${BOOKLORE_PORT:6060}
port: ${SERVER_PORT:${BOOKLORE_PORT:6060}}
compression:
enabled: true
mime-types: text/html,text/css,application/javascript,application/json,image/svg+xml,application/xml,application/atom+xml
+1 -1
View File
@@ -20,7 +20,7 @@ Environment=TZ=Etc/UTC
Secret=grimmory_db_pass,type=env,target=DATABASE_PASSWORD
Environment=DATABASE_URL=jdbc:mariadb://localhost:3306/grimmory
Environment=DATABASE_USERNAME=grimmory
HealthCmd=CMD-SHELL wget -q --spider http://localhost:${BOOKLORE_PORT:-6060}/api/v1/healthcheck
HealthCmd=CMD-SHELL wget -q --spider http://localhost:${SERVER_PORT:-6060}/api/v1/healthcheck
HealthInterval=1m
HealthRetries=5
HealthStartPeriod=1m