Compare commits
4 commits
d1aeac3db0
...
155b2bc649
| Author | SHA1 | Date | |
|---|---|---|---|
| 155b2bc649 | |||
| 74416bae2d | |||
| 1ac026ea9f | |||
| 2eb45e22e2 |
10 changed files with 695 additions and 890 deletions
29
Dockerfile
29
Dockerfile
|
|
@ -18,16 +18,37 @@
|
|||
# RUN bun run build
|
||||
|
||||
# FROM base AS release
|
||||
# COPY --from=base /app/package.json /app/bun.lock ./
|
||||
# COPY --from=install /temp/prod/node_modules node_modules
|
||||
# COPY --from=build /usr/src/app/dist .
|
||||
|
||||
# EXPOSE 4321
|
||||
# ENTRYPOINT [ "bun", "run", "./server/entry.mjs" ]
|
||||
# ENTRYPOINT [ "bun", "run", "start" ]
|
||||
|
||||
FROM oven/bun:latest
|
||||
|
||||
FROM oven/bun:latest AS base
|
||||
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 . .
|
||||
RUN bun install
|
||||
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
|
||||
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" ]
|
||||
|
|
@ -9,18 +9,16 @@ import { defineConfig } from "astro/config"
|
|||
|
||||
import robotsTxt from "astro-robots-txt"
|
||||
import addClasses from "rehype-class-names"
|
||||
// import remarkRehype from "remark-rehype"
|
||||
|
||||
import og from "astro-og";
|
||||
import bun from "@hedystia/astro-bun";
|
||||
|
||||
import node from "@astrojs/node";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
output: "server",
|
||||
adapter: bun(),
|
||||
output: "server",
|
||||
prefetch: true,
|
||||
site: "https://lio.cat",
|
||||
|
||||
markdown: {
|
||||
remarkRehype: {},
|
||||
rehypePlugins: [
|
||||
|
|
@ -45,8 +43,4 @@ export default defineConfig({
|
|||
showLineNumbers: true,
|
||||
},
|
||||
}), mdx({}), robotsTxt(), og()],
|
||||
|
||||
adapter: node({
|
||||
mode: "standalone",
|
||||
}),
|
||||
})
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
"tsx": true,
|
||||
"tailwind": {
|
||||
"config": "tailwind.config.mjs",
|
||||
"css": "src/styles/tailwind.css",
|
||||
"css": "src/styles/global.css",
|
||||
"baseColor": "neutral",
|
||||
"cssVariables": true,
|
||||
"prefix": ""
|
||||
|
|
|
|||
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal 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
|
||||
|
||||
11
package.json
11
package.json
|
|
@ -1,32 +1,32 @@
|
|||
{
|
||||
"name": "astro-air",
|
||||
"name": "wrath",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"dev": "astro dev --host 0.0.0.0",
|
||||
"build": "astro check && astro build",
|
||||
"check": "astro check",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro",
|
||||
"format": "prettier --write ."
|
||||
"format": "prettier --write .",
|
||||
"start": "bun run ./dist/server/entry.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.5",
|
||||
"@astrojs/mdx": "^4.3.11",
|
||||
"@astrojs/node": "^9.5.1",
|
||||
"@astrojs/react": "^4.4.2",
|
||||
"@astrojs/rss": "^4.0.13",
|
||||
"@astrojs/sitemap": "^3.6.0",
|
||||
"@expressive-code/plugin-collapsible-sections": "^0.40.2",
|
||||
"@expressive-code/plugin-line-numbers": "^0.41.3",
|
||||
"@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",
|
||||
"@types/react": "^19.2.6",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vercel/og": "^0.8.5",
|
||||
"astro": "^5.15.9",
|
||||
"astro-expressive-code": "^0.40.2",
|
||||
"astro-google-analytics": "^1.0.3",
|
||||
"astro-og": "^0.3.0",
|
||||
"astro-og-canvas": "^0.7.2",
|
||||
"astro-robots-txt": "^1.0.0",
|
||||
|
|
@ -46,7 +46,6 @@
|
|||
"tailwindcss": "^4.1.17",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"twikoo": "^1.6.44",
|
||||
"typescript": "^5.9.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
---
|
||||
import { NoiseBackground } from "~/components/react/noise-background"
|
||||
// import { NoiseBackground } from "~/components/react/noise-background"
|
||||
import { getLangFromUrl } from "~/i18n/utils"
|
||||
import { GoogleAnalytics } from "astro-google-analytics"
|
||||
import { en, de } from "~/config"
|
||||
import { ClientRouter } from "astro:transitions"
|
||||
|
||||
import "~/styles/tailwind.css"
|
||||
import "~/styles/global.css"
|
||||
// import "~/styles/view-transition.css"
|
||||
|
||||
const lang = getLangFromUrl(Astro.url)
|
||||
|
|
@ -16,8 +15,6 @@ const urls = {
|
|||
general: `/images/general/ogImage.png`,
|
||||
}
|
||||
|
||||
const isPost = post
|
||||
|
||||
const ogImageURL = new URL(post ? urls.postURL : urls.general, Astro.site).href
|
||||
const permalink = new URL(Astro.url.pathname, Astro.site).href
|
||||
const config = lang === "de" ? de : en
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
export const prerender = true
|
||||
import { getCollection, type CollectionEntry } from "astro:content"
|
||||
import { type CollectionEntry } from "astro:content"
|
||||
import fs from "fs"
|
||||
import { join, resolve } from "node:path"
|
||||
import { join } from "node:path"
|
||||
import { ImageResponse } from "@vercel/og"
|
||||
import { getPostsByLocale } from "~/utils"
|
||||
import type { ReactElement } from "react"
|
||||
|
|
|
|||
|
|
@ -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")],
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue