Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: app release information to the readiness probe #391

Merged
merged 2 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/events-helsinki/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ DOCKER_BUILDKIT="true"
NEXT_PUBLIC_SHOW_SIMILAR_EVENTS="true"
NEXT_PUBLIC_SHOW_ENROLMENT_STATUS_IN_CARD_DETAILS="false"
SKIP_BUILD_STATIC_GENERATION=1
REVALIDATE_TOKEN="revalidate_token"
REVALIDATE_TOKEN="revalidate_token"
NEXT_PUBLIC_RELEASE="dev-local"
NEXT_PUBLIC_COMMITHASH=""
13 changes: 12 additions & 1 deletion apps/events-helsinki/src/pages/api/readiness.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import type { NextApiRequest, NextApiResponse } from 'next';

export default function handler(_: NextApiRequest, res: NextApiResponse) {
res.status(200).json({ status: 'ok' });
const packageVersion = process.env.APP_VERSION ?? '';
const release = process.env.NEXT_PUBLIC_RELEASE ?? '';
const commitHash = process.env.NEXT_PUBLIC_COMMITHASH ?? '';
const buildTime = process.env.BUILD_TIME ?? '';

res.status(200).json({
status: 'ok',
release,
packageVersion,
commitHash,
buildTime,
});
}
4 changes: 3 additions & 1 deletion apps/hobbies-helsinki/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ DOCKER_BUILDKIT="true"
NEXT_PUBLIC_SHOW_SIMILAR_EVENTS="true"
NEXT_PUBLIC_SHOW_ENROLMENT_STATUS_IN_CARD_DETAILS="false"
SKIP_BUILD_STATIC_GENERATION=1
REVALIDATE_TOKEN="revalidate_token"
REVALIDATE_TOKEN="revalidate_token"
NEXT_PUBLIC_RELEASE="dev-local"
NEXT_PUBLIC_COMMITHASH=""
13 changes: 12 additions & 1 deletion apps/hobbies-helsinki/src/pages/api/readiness.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import type { NextApiRequest, NextApiResponse } from 'next';

export default function handler(_: NextApiRequest, res: NextApiResponse) {
res.status(200).json({ status: 'ok' });
const packageVersion = process.env.APP_VERSION ?? '';
const release = process.env.NEXT_PUBLIC_RELEASE ?? '';
const commitHash = process.env.NEXT_PUBLIC_COMMITHASH ?? '';
const buildTime = process.env.BUILD_TIME ?? '';

res.status(200).json({
status: 'ok',
release,
packageVersion,
commitHash,
buildTime,
});
}
2 changes: 2 additions & 0 deletions docker-compose.events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ services:
- NEXT_PUBLIC_CMS_FOOTER_MENU_NAME_SV
- NEXT_PUBLIC_CMS_ARTICLES_CONTEXT_PATH
- NEXT_PUBLIC_CMS_PAGES_CONTEXT_PATH
- NEXT_PUBLIC_RELEASE
- NEXT_PUBLIC_COMMITHASH
volumes:
build_events-helsinki:
nm_events-helsinki:
2 changes: 2 additions & 0 deletions docker-compose.hobbies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ services:
- NEXT_PUBLIC_CMS_FOOTER_MENU_NAME_SV
- NEXT_PUBLIC_CMS_ARTICLES_CONTEXT_PATH
- NEXT_PUBLIC_CMS_PAGES_CONTEXT_PATH
- NEXT_PUBLIC_RELEASE
- NEXT_PUBLIC_COMMITHASH
volumes:
build_hobbies-helsinki:
nm_hobbies-helsinki:
Loading