Skip to content

Commit 3d21a39

Browse files
committed
chore: wip
chore: wip
1 parent f499617 commit 3d21a39

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

storage/framework/core/cloud/src/cloud/compute.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class ComputeStack {
5353
}),
5454
}),
5555
healthCheck: {
56-
command: ['CMD-SHELL', 'curl -f http://localhost:3000/health || exit 1'],
56+
command: ['CMD-SHELL', 'curl -f http://localhost:3000/health || exit 1'], // requires curl inside the container which isn't available in the base image. I wonder if there is a better way
5757
interval: Duration.seconds(10),
5858
timeout: Duration.seconds(5),
5959
retries: 3,
@@ -110,7 +110,7 @@ export class ComputeStack {
110110
port: 3000,
111111
healthCheck: {
112112
interval: Duration.seconds(6),
113-
path: '/',
113+
path: '/health',
114114
protocol: elbv2.Protocol.HTTP,
115115
timeout: Duration.seconds(5),
116116
healthyThresholdCount: 2,

storage/framework/server/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
FROM oven/bun:1 as base
44
WORKDIR /usr/src/app
55

6+
# Install curl - I wonder if there is a better way to do this, because it is only needed for the healthcheck
7+
RUN apt-get update && apt-get install -y curl
8+
69
# install dependencies into temp directory
710
# this will cache them and speed up future builds
811
FROM base AS install

storage/framework/server/build.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { $ } from 'bun'
22

3-
await $`echo 'test'`
4-
53
await $`cp -r ../../../config ./config`
64
await $`cp -r ../../../routes ./routes`
75

storage/framework/server/index.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ const server = Bun.serve({
55
port: 3000,
66

77
async fetch(request: Request, server: Server): Promise<Response | undefined> {
8-
// eslint-disable-next-line no-console
9-
console.log('Request', {
10-
url: request.url,
11-
method: request.method,
12-
headers: request.headers.toJSON(),
13-
body: request.body ? await request.text() : null,
14-
})
8+
// console.log('Request', {
9+
// url: request.url,
10+
// method: request.method,
11+
// headers: request.headers.toJSON(),
12+
// body: request.body ? await request.text() : null,
13+
// })
1514

1615
if (server.upgrade(request)) {
1716
// eslint-disable-next-line no-console

0 commit comments

Comments
 (0)