Skip to content
Snippets Groups Projects
Commit cd947208 authored by Christof Bauer's avatar Christof Bauer
Browse files

Merge branch 'main' into production

parents 27bcd946 06f9abbe
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ variables:
## common steps
cache_lint_test:
image: 'europe-north1-docker.pkg.dev/holi-shared/docker-hub-remote/denoland/deno:2.1.9'
image: 'europe-north1-docker.pkg.dev/holi-shared/docker-hub-remote/denoland/deno:2.1.10'
stage: 'test'
script:
- deno cache --allow-import --lock=deno.lock app/deps.ts app/dev_deps.ts
......
FROM europe-north1-docker.pkg.dev/holi-shared/docker-hub-remote/denoland/deno:2.1.9
FROM europe-north1-docker.pkg.dev/holi-shared/docker-hub-remote/denoland/deno:2.1.10
# The port that your application listens to.
EXPOSE 8003
......
......@@ -141,7 +141,18 @@ export type GraphQLServer = any
export const startServer = (config: ServerConfig): Promise<void> => {
const graphQLServer: GraphQLServer = createGraphQLServer(config)
return serve(graphQLServer.handleRequest, {
const handler = (request: Request): Response => {
const url = new URL(request.url)
if (url.pathname === '/health') {
return new Response('OK', { status: 200 })
}
return graphQLServer.handleRequest(request)
}
return serve(handler, {
port: config.port,
onListen({ port, hostname }) {
logger.info(
......
......@@ -70,6 +70,24 @@ resource "google_cloud_run_service" "geo_api" {
memory = local.environment == "production" ? "512Mi" : "256Mi"
}
}
startup_probe {
http_get {
path = "/health"
}
initial_delay_seconds = 5
failure_threshold = 3
period_seconds = 5
timeout_seconds = 2
}
liveness_probe {
http_get {
path = "/health"
}
initial_delay_seconds = 10
period_seconds = 30
timeout_seconds = 2
failure_threshold = 3
}
}
container_concurrency = 0 # 0 means thread safe, no restriction on max concurrency
}
......@@ -82,7 +100,7 @@ resource "google_cloud_run_service" "geo_api" {
"run.googleapis.com/vpc-access-connector" = data.terraform_remote_state.holi_infra_state.outputs.vpc_access_connector_name
# possible values: all-traffic/private-ranges-only(default) https://cloud.google.com/sdk/gcloud/reference/run/services/update#--vpc-egress
"run.googleapis.com/vpc-access-egress" = "private-ranges-only"
"run.googleapis.com/startup-cpu-boost" = "true"
"run.googleapis.com/startup-cpu-boost" = "true"
}
# labels set on the revision level
labels = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment