Compare commits

..

4 commits

Author SHA1 Message Date
Lio
155b2bc649 move back to bun, hopefully fix docker and 404 2025-11-19 18:55:52 +01:00
Lio
74416bae2d rename tailwind stylesheet 2025-11-19 18:45:12 +01:00
Lio
1ac026ea9f move to yarn 2025-11-19 12:43:00 +01:00
Lio
2eb45e22e2 remove dockerfile 2025-11-19 12:22:10 +01:00
10 changed files with 695 additions and 890 deletions

View file

@ -18,16 +18,37 @@
# RUN bun run build # RUN bun run build
# FROM base AS release # FROM base AS release
# COPY --from=base /app/package.json /app/bun.lock ./
# COPY --from=install /temp/prod/node_modules node_modules # COPY --from=install /temp/prod/node_modules node_modules
# COPY --from=build /usr/src/app/dist . # COPY --from=build /usr/src/app/dist .
# EXPOSE 4321 # EXPOSE 4321
# ENTRYPOINT [ "bun", "run", "./server/entry.mjs" ] # ENTRYPOINT [ "bun", "run", "start" ]
FROM oven/bun:latest
FROM oven/bun:latest AS base
WORKDIR /app WORKDIR /app
FROM base AS deps
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
FROM base AS build
COPY --from=deps /app/node_modules node_modules
COPY . . COPY . .
RUN bun install
RUN bun run build RUN bun run build
FROM base AS release
COPY --from=deps /app/node_modules node_modules
COPY --from=build /app/dist ./dist
COPY package.json bun.lock ./
EXPOSE 4321 EXPOSE 4321
ENTRYPOINT [ "bun", "run", "preview" ] ENTRYPOINT [ "bun", "run", "start" ]
# ENTRYPOINT [ "sleep", "infinity" ]
# COPY . .
# RUN bun install
# RUN bun run build
# EXPOSE 4321
# ENTRYPOINT [ "bun", "run", "start" ]

View file

@ -9,18 +9,16 @@ import { defineConfig } from "astro/config"
import robotsTxt from "astro-robots-txt" import robotsTxt from "astro-robots-txt"
import addClasses from "rehype-class-names" import addClasses from "rehype-class-names"
// import remarkRehype from "remark-rehype"
import og from "astro-og"; import og from "astro-og";
import bun from "@hedystia/astro-bun";
import node from "@astrojs/node";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
adapter: bun(),
output: "server", output: "server",
prefetch: true, prefetch: true,
site: "https://lio.cat", site: "https://lio.cat",
markdown: { markdown: {
remarkRehype: {}, remarkRehype: {},
rehypePlugins: [ rehypePlugins: [
@ -45,8 +43,4 @@ export default defineConfig({
showLineNumbers: true, showLineNumbers: true,
}, },
}), mdx({}), robotsTxt(), og()], }), mdx({}), robotsTxt(), og()],
adapter: node({
mode: "standalone",
}),
}) })

1498
bun.lock

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
"tsx": true, "tsx": true,
"tailwind": { "tailwind": {
"config": "tailwind.config.mjs", "config": "tailwind.config.mjs",
"css": "src/styles/tailwind.css", "css": "src/styles/global.css",
"baseColor": "neutral", "baseColor": "neutral",
"cssVariables": true, "cssVariables": true,
"prefix": "" "prefix": ""

13
docker-compose.yml Normal file
View file

@ -0,0 +1,13 @@
services:
app:
build:
context: .
target: release
ports:
- "4321:4321"
environment:
NODE_ENV: production
HOST: 0.0.0.0
PORT: 4321
restart: unless-stopped

View file

@ -1,32 +1,32 @@
{ {
"name": "astro-air", "name": "wrath",
"type": "module", "type": "module",
"version": "0.0.1", "version": "0.0.1",
"scripts": { "scripts": {
"dev": "astro dev --host 0.0.0.0", "dev": "astro dev --host 0.0.0.0",
"build": "astro check && astro build", "build": "astro check && astro build",
"check": "astro check",
"preview": "astro preview", "preview": "astro preview",
"astro": "astro", "astro": "astro",
"format": "prettier --write ." "format": "prettier --write .",
"start": "bun run ./dist/server/entry.mjs"
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.9.5", "@astrojs/check": "^0.9.5",
"@astrojs/mdx": "^4.3.11", "@astrojs/mdx": "^4.3.11",
"@astrojs/node": "^9.5.1",
"@astrojs/react": "^4.4.2", "@astrojs/react": "^4.4.2",
"@astrojs/rss": "^4.0.13", "@astrojs/rss": "^4.0.13",
"@astrojs/sitemap": "^3.6.0", "@astrojs/sitemap": "^3.6.0",
"@expressive-code/plugin-collapsible-sections": "^0.40.2", "@expressive-code/plugin-collapsible-sections": "^0.40.2",
"@expressive-code/plugin-line-numbers": "^0.41.3", "@expressive-code/plugin-line-numbers": "^0.41.3",
"@fontsource-variable/jetbrains-mono": "^5.2.8", "@fontsource-variable/jetbrains-mono": "^5.2.8",
"@radix-ui/react-hover-card": "^1.1.15", "@hedystia/astro-bun": "^0.3.2",
"@tailwindcss/vite": "^4.1.17", "@tailwindcss/vite": "^4.1.17",
"@types/react": "^19.2.6", "@types/react": "^19.2.6",
"@types/react-dom": "^19.2.3", "@types/react-dom": "^19.2.3",
"@vercel/og": "^0.8.5", "@vercel/og": "^0.8.5",
"astro": "^5.15.9", "astro": "^5.15.9",
"astro-expressive-code": "^0.40.2", "astro-expressive-code": "^0.40.2",
"astro-google-analytics": "^1.0.3",
"astro-og": "^0.3.0", "astro-og": "^0.3.0",
"astro-og-canvas": "^0.7.2", "astro-og-canvas": "^0.7.2",
"astro-robots-txt": "^1.0.0", "astro-robots-txt": "^1.0.0",
@ -46,7 +46,6 @@
"tailwindcss": "^4.1.17", "tailwindcss": "^4.1.17",
"tailwindcss-animate": "^1.0.7", "tailwindcss-animate": "^1.0.7",
"tw-animate-css": "^1.4.0", "tw-animate-css": "^1.4.0",
"twikoo": "^1.6.44",
"typescript": "^5.9.3" "typescript": "^5.9.3"
}, },
"devDependencies": { "devDependencies": {

View file

@ -1,11 +1,10 @@
--- ---
import { NoiseBackground } from "~/components/react/noise-background" // import { NoiseBackground } from "~/components/react/noise-background"
import { getLangFromUrl } from "~/i18n/utils" import { getLangFromUrl } from "~/i18n/utils"
import { GoogleAnalytics } from "astro-google-analytics"
import { en, de } from "~/config" import { en, de } from "~/config"
import { ClientRouter } from "astro:transitions" import { ClientRouter } from "astro:transitions"
import "~/styles/tailwind.css" import "~/styles/global.css"
// import "~/styles/view-transition.css" // import "~/styles/view-transition.css"
const lang = getLangFromUrl(Astro.url) const lang = getLangFromUrl(Astro.url)
@ -16,8 +15,6 @@ const urls = {
general: `/images/general/ogImage.png`, general: `/images/general/ogImage.png`,
} }
const isPost = post
const ogImageURL = new URL(post ? urls.postURL : urls.general, Astro.site).href const ogImageURL = new URL(post ? urls.postURL : urls.general, Astro.site).href
const permalink = new URL(Astro.url.pathname, Astro.site).href const permalink = new URL(Astro.url.pathname, Astro.site).href
const config = lang === "de" ? de : en const config = lang === "de" ? de : en

View file

@ -1,7 +1,7 @@
export const prerender = true export const prerender = true
import { getCollection, type CollectionEntry } from "astro:content" import { type CollectionEntry } from "astro:content"
import fs from "fs" import fs from "fs"
import { join, resolve } from "node:path" import { join } from "node:path"
import { ImageResponse } from "@vercel/og" import { ImageResponse } from "@vercel/og"
import { getPostsByLocale } from "~/utils" import { getPostsByLocale } from "~/utils"
import type { ReactElement } from "react" import type { ReactElement } from "react"

View file

@ -1,9 +0,0 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
darkMode: ["class"],
theme: {
extend: {},
},
plugins: [require("@tailwindcss/typography")],
}