Skip to content

Commit 1bbc855

Browse files
authored
Merge pull request #76 from datum-cloud/fix/add-secret-ref
fix: upgrade bun, add secret and build info
2 parents 8211a69 + d7f1d4c commit 1bbc855

File tree

5 files changed

+28
-16
lines changed

5 files changed

+28
-16
lines changed

Dockerfile

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
FROM oven/bun:1.2-slim AS base
2-
1+
FROM oven/bun:1.3-slim AS base
2+
ENV HOST=0.0.0.0
3+
ENV PORT=4321
34
WORKDIR /app
45

56
COPY package.json bun.lock ./
@@ -10,29 +11,18 @@ COPY . .
1011
RUN bun run build
1112

1213
FROM base AS development
13-
COPY . .
14-
1514
ENV NODE_ENV=development
16-
ENV HOST=0.0.0.0
17-
ENV PORT=4321
15+
COPY . .
1816
RUN chmod -R 755 src/pages
1917

2018
EXPOSE 4321
2119
CMD ["bun", "run", "dev"]
2220

23-
FROM oven/bun:1.2-slim AS production
24-
25-
WORKDIR /app
26-
21+
FROM oven/bun:1.3-slim AS production
22+
ENV NODE_ENV=production
2723
COPY --from=build /app/dist ./dist
2824
COPY --from=build /app/package.json ./
2925
COPY --from=build /app/bun.lock ./
30-
# COPY --from=build /app/src/pages ./src/pages
31-
# RUN chmod -R 755 src/pages
32-
ENV NODE_ENV=production
33-
ENV HOST=0.0.0.0
34-
ENV PORT=4321
3526

3627
EXPOSE 4321
37-
3828
CMD ["bun", "./dist/server/entry.mjs"]

bun.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"astro-breadcrumbs": "^3.3.1",
1919
"astro-seo": "^0.8.4",
2020
"date-fns": "^4.1.0",
21+
"dayjs": "^1.11.19",
2122
"lenis": "^1.3.13",
2223
"lucide-astro": "^0.548.0",
2324
"mermaid": "^11.12.0",

config/base/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ spec:
3838
env:
3939
- name: SITE_URL
4040
value: https://www.milo-os.com/
41+
envFrom:
42+
- secretRef:
43+
name: milo-os-com
4144
resources:
4245
requests:
4346
cpu: 100m

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"astro-breadcrumbs": "^3.3.1",
3535
"astro-seo": "^0.8.4",
3636
"date-fns": "^4.1.0",
37+
"dayjs": "^1.11.19",
3738
"lenis": "^1.3.13",
3839
"lucide-astro": "^0.548.0",
3940
"mermaid": "^11.12.0",

src/pages/dev/build.astro

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
import dayjs from 'dayjs';
3+
4+
const lastBuild = dayjs().format('MMM DD, YYYY - HH:mm');
5+
6+
return new Response(
7+
JSON.stringify({
8+
lastBuild: lastBuild,
9+
}),
10+
{
11+
status: 200,
12+
headers: {
13+
'Content-Type': 'application/json',
14+
},
15+
}
16+
);
17+
---

0 commit comments

Comments
 (0)