Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
holi-translation-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
app
holi-translation-api
Commits
8d760235
Commit
8d760235
authored
1 month ago
by
Christof Bauer
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' into production
parents
f3d25ad6
fcc3113c
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
Dockerfile
+1
-1
1 addition, 1 deletion
Dockerfile
app/server.ts
+12
-1
12 additions, 1 deletion
app/server.ts
terraform/environments/deployment.tf
+22
-0
22 additions, 0 deletions
terraform/environments/deployment.tf
with
36 additions
and
3 deletions
.gitlab-ci.yml
+
1
−
1
View file @
8d760235
...
...
@@ -39,7 +39,7 @@ variables:
# TODO should/could we roll back the service to the last working revision on test failure?
cache_lint
:
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
...
...
This diff is collapsed.
Click to expand it.
Dockerfile
+
1
−
1
View file @
8d760235
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
8089
...
...
This diff is collapsed.
Click to expand it.
app/server.ts
+
12
−
1
View file @
8d760235
...
...
@@ -81,7 +81,18 @@ export type GraphQLServer = any
export
const
startServer
=
(
config
:
ServerConfig
):
Promise
<
void
>
=>
{
const
graphQLServer
:
GraphQLServer
=
createGraphQLServer
(
config
)
return
serve
(
graphQLServer
,
{
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
(
...
...
This diff is collapsed.
Click to expand it.
terraform/environments/deployment.tf
+
22
−
0
View file @
8d760235
...
...
@@ -78,6 +78,24 @@ resource "google_cloud_run_v2_service" "translation_api_service" {
cpu_idle
=
true
startup_cpu_boost
=
true
}
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
}
}
scaling
{
...
...
@@ -106,8 +124,12 @@ resource "google_cloud_run_v2_service" "translation_api_service" {
traffic
{
percent
=
100
type
=
"TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST"
}
depends_on
=
[
google_project_service
.
service
]
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment