Skip to content

Commit

Permalink
fix: retrieve build date and service env (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccheng26 authored Jul 26, 2024
1 parent c753bb5 commit deeece6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ async def health(request: Request) -> HealthCheck:

git_sha = os.environ.get("IMAGE_TAG", "")
build_date = os.environ.get("BUILD_DATE", "")
service_name = os.environ.get("ENVIRONMENT", "")

service_name = os.environ.get("SERVICE_NAME", "")
hostname = f"{platform.node()} {socket.gethostname()}"

logger.info(f"Healthy {git_sha} built at {build_date}: {service_name} {hostname}")
Expand Down
2 changes: 2 additions & 0 deletions infra/app/service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ module "service" {
extra_environment_variables = merge({
FEATURE_FLAGS_PROJECT = module.feature_flags.evidently_project_name
BUCKET_NAME = local.storage_config.bucket_name
ENVIRONMENT = var.environment_name
BUILD_DATE = timestamp()
}, local.service_config.extra_environment_variables)

secrets = [
Expand Down

0 comments on commit deeece6

Please sign in to comment.