Move to Bun
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,23 +1,17 @@
|
|||||||
FROM node:24-alpine AS builder
|
FROM oven/bun:1.3.9-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk add --no-cache libc6-compat && \
|
COPY package.json bun.lock* ./
|
||||||
corepack enable && corepack prepare pnpm@latest --activate
|
|
||||||
|
|
||||||
COPY package.json pnpm-lock.yaml ./
|
RUN bun install --frozen-lockfile || bun install
|
||||||
|
|
||||||
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
|
|
||||||
pnpm install --frozen-lockfile || pnpm install
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pnpm run build
|
RUN bun run build
|
||||||
RUN pnpm prune --prod
|
RUN rm -rf node_modules && bun install --production
|
||||||
|
|
||||||
FROM node:24-alpine AS runtime
|
FROM oven/bun:1.3.9-alpine AS runtime
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk add --no-cache libc6-compat
|
|
||||||
|
|
||||||
COPY --from=builder /app/dist ./dist
|
COPY --from=builder /app/dist ./dist
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
@@ -26,4 +20,4 @@ ENV HOST=0.0.0.0
|
|||||||
ENV PORT=4321
|
ENV PORT=4321
|
||||||
EXPOSE 4321
|
EXPOSE 4321
|
||||||
|
|
||||||
CMD ["node", "./dist/server/entry.mjs"]
|
CMD ["bun", "run", "./dist/server/entry.mjs"]
|
||||||
|
|||||||
@@ -22,14 +22,12 @@
|
|||||||
devShells = forAllSystems ({ pkgs }: {
|
devShells = forAllSystems ({ pkgs }: {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
nodejs_24
|
bun
|
||||||
nodePackages.pnpm
|
|
||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
echo "<atashdotdev dev shell>"
|
echo "<atashdotdev dev shell>"
|
||||||
echo "Node version: $(node --version)"
|
echo "Bun version: $(bun --version)"
|
||||||
echo "pnpm version: $(pnpm --version)"
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/node": "10.0.0-beta.5",
|
"@astrojs/node": "10.0.0-beta.5",
|
||||||
"@astrojs/vue": "6.0.0-beta.1",
|
"@astrojs/vue": "6.0.0-beta.1",
|
||||||
"@fontsource-variable/inter": "^5.2.8",
|
|
||||||
"@fontsource-variable/roboto-slab": "^5.2.8",
|
"@fontsource-variable/roboto-slab": "^5.2.8",
|
||||||
"@tailwindcss/vite": "^4.2.1",
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
"astro": "6.0.0-beta.15",
|
"astro": "6.0.0-beta.15",
|
||||||
@@ -24,5 +23,6 @@
|
|||||||
"@types/node": "^25.3.0",
|
"@types/node": "^25.3.0",
|
||||||
"@types/nodemailer": "^7.0.11",
|
"@types/nodemailer": "^7.0.11",
|
||||||
"daisyui": "^5.5.19"
|
"daisyui": "^5.5.19"
|
||||||
}
|
},
|
||||||
|
"packageManager": "bun@1.3.9"
|
||||||
}
|
}
|
||||||
|
|||||||
4815
pnpm-lock.yaml
generated
4815
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -22,14 +22,13 @@ import { Image } from "astro:assets";
|
|||||||
<ul
|
<ul
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
class="menu menu-sm dropdown-content bg-base-100 rounded-xl z-50 mt-3 w-56 p-3 shadow-xl border border-base-200"
|
class="menu menu-sm dropdown-content bg-base-100 rounded-xl z-50 mt-3 w-56 p-3 shadow-xl border border-base-200"
|
||||||
role="menu"
|
aria-label="Navigation Button"
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
siteConfig.header.nav.map(({ text, href }) => (
|
siteConfig.header.nav.map(({ text, href }) => (
|
||||||
<li role="none">
|
<li>
|
||||||
<a
|
<a
|
||||||
href={href}
|
href={href}
|
||||||
role="menuitem"
|
|
||||||
class="py-3 px-4 rounded-lg font-medium hover:bg-primary/10 hover:text-primary transition-colors"
|
class="py-3 px-4 rounded-lg font-medium hover:bg-primary/10 hover:text-primary transition-colors"
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
@@ -60,13 +59,12 @@ import { Image } from "astro:assets";
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<nav class="navbar-center hidden lg:flex" aria-label="Main navigation">
|
<nav class="navbar-center hidden lg:flex" aria-label="Main navigation">
|
||||||
<ul class="menu menu-horizontal gap-1" role="menubar">
|
<ul class="menu menu-horizontal gap-1">
|
||||||
{
|
{
|
||||||
siteConfig.header.nav.map(({ text, href }) => (
|
siteConfig.header.nav.map(({ text, href }) => (
|
||||||
<li role="none">
|
<li>
|
||||||
<a
|
<a
|
||||||
href={href}
|
href={href}
|
||||||
role="menuitem"
|
|
||||||
class="font-medium px-4 py-2 rounded-lg hover:bg-primary/10 hover:text-primary transition-colors"
|
class="font-medium px-4 py-2 rounded-lg hover:bg-primary/10 hover:text-primary transition-colors"
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
@@ -80,7 +78,7 @@ import { Image } from "astro:assets";
|
|||||||
<a
|
<a
|
||||||
href={siteConfig.header.cta.href}
|
href={siteConfig.header.cta.href}
|
||||||
class="btn btn-primary btn-sm lg:btn-md shadow-md hover:shadow-lg transition-all"
|
class="btn btn-primary btn-sm lg:btn-md shadow-md hover:shadow-lg transition-all"
|
||||||
role="button"
|
aria-label={siteConfig.header.cta.text}
|
||||||
>
|
>
|
||||||
{siteConfig.header.cta.text}
|
{siteConfig.header.cta.text}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ ${message.value}`,
|
|||||||
</legend>
|
</legend>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="firstName"
|
||||||
name="firstName"
|
name="firstName"
|
||||||
|
:aria-label="siteConfig.contact.form.firstName"
|
||||||
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
|
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
|
||||||
required
|
required
|
||||||
v-model="firstName"
|
v-model="firstName"
|
||||||
@@ -96,7 +98,9 @@ ${message.value}`,
|
|||||||
</legend>
|
</legend>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="lastName"
|
||||||
name="lastName"
|
name="lastName"
|
||||||
|
:aria-label="siteConfig.contact.form.lastName"
|
||||||
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
|
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
|
||||||
required
|
required
|
||||||
v-model="lastName"
|
v-model="lastName"
|
||||||
@@ -117,7 +121,9 @@ ${message.value}`,
|
|||||||
</legend>
|
</legend>
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
|
id="email"
|
||||||
name="email"
|
name="email"
|
||||||
|
:aria-label="siteConfig.contact.form.email"
|
||||||
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
|
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
|
||||||
required
|
required
|
||||||
v-model="email"
|
v-model="email"
|
||||||
@@ -136,7 +142,9 @@ ${message.value}`,
|
|||||||
</legend>
|
</legend>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="company"
|
||||||
name="company"
|
name="company"
|
||||||
|
:aria-label="siteConfig.contact.form.company"
|
||||||
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
|
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
|
||||||
v-model="company"
|
v-model="company"
|
||||||
:disabled="status === 'sending'"
|
:disabled="status === 'sending'"
|
||||||
@@ -215,6 +223,7 @@ ${message.value}`,
|
|||||||
<textarea
|
<textarea
|
||||||
id="project-details"
|
id="project-details"
|
||||||
name="message"
|
name="message"
|
||||||
|
:aria-label="siteConfig.contact.form.message"
|
||||||
class="textarea textarea-bordered h-36 w-full resize-none bg-base-100 focus:border-primary focus:outline-primary"
|
class="textarea textarea-bordered h-36 w-full resize-none bg-base-100 focus:border-primary focus:outline-primary"
|
||||||
:placeholder="
|
:placeholder="
|
||||||
siteConfig.contact.form.placeholders.message
|
siteConfig.contact.form.placeholders.message
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const rotatingText = (siteConfig.hero as any).rotatingText as
|
|||||||
|
|
||||||
<div class="relative max-w-7xl mx-auto px-6">
|
<div class="relative max-w-7xl mx-auto px-6">
|
||||||
<div class="text-center max-w-4xl mx-auto">
|
<div class="text-center max-w-4xl mx-auto">
|
||||||
<StatusIndicator client:load />
|
<StatusIndicator client:idle />
|
||||||
|
|
||||||
<h1
|
<h1
|
||||||
class="text-4xl sm:text-5xl lg:text-6xl xl:text-7xl font-extrabold text-white leading-tight tracking-tight mb-6"
|
class="text-4xl sm:text-5xl lg:text-6xl xl:text-7xl font-extrabold text-white leading-tight tracking-tight mb-6"
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ const isProd = import.meta.env.PROD;
|
|||||||
/>
|
/>
|
||||||
<meta property="og:image:type" content={resolvedOgImage.type} />
|
<meta property="og:image:type" content={resolvedOgImage.type} />
|
||||||
<meta property="og:image:alt" content={resolvedOgImage.alt} />
|
<meta property="og:image:alt" content={resolvedOgImage.alt} />
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
<link rel="canonical" href={siteUrl} />
|
||||||
<title>{metaTitle}</title>
|
<title>{metaTitle}</title>
|
||||||
{
|
{
|
||||||
isProd && (
|
isProd && (
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export const GET: APIRoute = async () => {
|
|||||||
status: 200,
|
status: 200,
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Cache-Control": "no-cache, no-store, must-revalidate",
|
"Cache-Control": "public, max-age=60, stale-while-revalidate=300",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user