This commit is contained in:
@@ -12,26 +12,27 @@ jobs:
|
|||||||
packages: write
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to Container Registry
|
- name: Login to Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.REPO_HOST }}
|
registry: ${{ secrets.REPO_HOST }}
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.DEPLOY_TOKEN }}
|
password: ${{ secrets.DEPLOY_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
build-args: |
|
|
||||||
PUBLIC_RSS_TIMEZONE=${{ vars.PUBLIC_RSS_TIMEZONE }}
|
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
||||||
|
provenance: false
|
||||||
|
cache-from: type=registry,ref=${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:buildcache
|
||||||
|
cache-to: type=registry,ref=${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:buildcache,mode=max
|
||||||
55
Dockerfile
55
Dockerfile
@@ -1,53 +1,28 @@
|
|||||||
FROM node:24-alpine AS base
|
FROM oven/bun:1.3.9-alpine AS base
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
|
||||||
python3 \
|
|
||||||
make \
|
|
||||||
g++ \
|
|
||||||
libc6-compat \
|
|
||||||
vips-dev
|
|
||||||
|
|
||||||
RUN npm install -g pnpm && \
|
|
||||||
pnpm config set store-dir /.pnpm-store && \
|
|
||||||
pnpm config set network-timeout 300000 && \
|
|
||||||
pnpm config set fetch-retries 10 && \
|
|
||||||
pnpm config set fetch-retry-factor 2
|
|
||||||
|
|
||||||
FROM base AS deps
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json pnpm-lock.yaml ./
|
FROM base AS prod-deps
|
||||||
|
COPY package.json bun.lock ./
|
||||||
|
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
|
||||||
|
bun install --production --frozen-lockfile || bun install --production
|
||||||
|
|
||||||
RUN --mount=type=cache,id=pnpm,target=/.pnpm-store \
|
FROM base AS builder
|
||||||
pnpm install --frozen-lockfile || \
|
COPY package.json bun.lock ./
|
||||||
(sleep 5 && pnpm install --frozen-lockfile) || \
|
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
|
||||||
(sleep 10 && pnpm install --frozen-lockfile --no-frozen-lockfile)
|
bun install --frozen-lockfile || bun install
|
||||||
|
|
||||||
FROM deps AS builder
|
|
||||||
|
|
||||||
ARG PUBLIC_RSS_TIMEZONE
|
|
||||||
ENV PUBLIC_RSS_TIMEZONE=${PUBLIC_RSS_TIMEZONE}
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN bun run build
|
||||||
|
|
||||||
RUN pnpm run build && \
|
FROM base AS runtime
|
||||||
pnpm prune --prod
|
|
||||||
|
|
||||||
FROM node:24-alpine AS runtime
|
|
||||||
|
|
||||||
RUN apk add --no-cache vips libc6-compat
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=builder /app/dist ./dist
|
COPY --from=builder /app/dist ./dist
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
COPY --from=prod-deps /app/node_modules ./node_modules
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
|
|
||||||
ENV HOST=0.0.0.0 \
|
ENV HOST=0.0.0.0
|
||||||
PORT=4321 \
|
ENV PORT=4321
|
||||||
NODE_ENV=production
|
|
||||||
|
|
||||||
EXPOSE 4321
|
EXPOSE 4321
|
||||||
|
|
||||||
CMD ["node", "./dist/server/entry.mjs"]
|
CMD ["bun", "run", "./dist/server/entry.mjs"]
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import vue from "@astrojs/vue";
|
|||||||
import node from "@astrojs/node";
|
import node from "@astrojs/node";
|
||||||
import mdx from "@astrojs/mdx";
|
import mdx from "@astrojs/mdx";
|
||||||
|
|
||||||
// https://astro.build/config
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: "https://atri.dad",
|
site: "https://atri.dad",
|
||||||
redirects: {
|
redirects: {
|
||||||
@@ -26,10 +25,7 @@ export default defineConfig({
|
|||||||
objectPosition: "center",
|
objectPosition: "center",
|
||||||
},
|
},
|
||||||
|
|
||||||
integrations: [
|
integrations: [vue(), mdx()],
|
||||||
vue(),
|
|
||||||
mdx(),
|
|
||||||
],
|
|
||||||
|
|
||||||
adapter: node({
|
adapter: node({
|
||||||
mode: "standalone",
|
mode: "standalone",
|
||||||
|
|||||||
38
flake.nix
38
flake.nix
@@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
description = "atridotdad dev shell";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
|
||||||
let
|
|
||||||
allSystems = [
|
|
||||||
"x86_64-linux"
|
|
||||||
"aarch64-linux"
|
|
||||||
"x86_64-darwin"
|
|
||||||
"aarch64-darwin"
|
|
||||||
];
|
|
||||||
|
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
|
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
});
|
|
||||||
in
|
|
||||||
{
|
|
||||||
devShells = forAllSystems ({ pkgs }: {
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
packages = with pkgs; [
|
|
||||||
nodejs_24
|
|
||||||
nodePackages.pnpm
|
|
||||||
git
|
|
||||||
];
|
|
||||||
|
|
||||||
shellHook = ''
|
|
||||||
echo "<atridotdad dev shell>"
|
|
||||||
echo "Node version: $(node --version)"
|
|
||||||
echo "pnpm version: $(pnpm --version)"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "atridotdad",
|
"name": "atridotdad",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "4.1.0",
|
"version": "4.2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
@@ -11,18 +11,18 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/mdx": "5.0.0-beta.8",
|
"@astrojs/mdx": "5.0.0-beta.8",
|
||||||
"@astrojs/node": "10.0.0-beta.4",
|
"@astrojs/node": "10.0.0-beta.5",
|
||||||
"@astrojs/rss": "4.0.15",
|
"@astrojs/rss": "4.0.15",
|
||||||
"@astrojs/vue": "6.0.0-beta.1",
|
"@astrojs/vue": "6.0.0-beta.1",
|
||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
"@react-pdf/renderer": "^4.3.2",
|
"@react-pdf/renderer": "^4.3.2",
|
||||||
"@tailwindcss/typography": "^0.5.19",
|
"@tailwindcss/typography": "^0.5.19",
|
||||||
"@tailwindcss/vite": "^4.2.1",
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
"astro": "6.0.0-beta.14",
|
"astro": "6.0.0-beta.15",
|
||||||
"react": "^19.2.4",
|
"react": "^19.2.4",
|
||||||
"sharp": "^0.34.5",
|
"sharp": "^0.34.5",
|
||||||
"tailwindcss": "^4.2.1",
|
"tailwindcss": "^4.2.1",
|
||||||
"vue": "^3.5.28"
|
"vue": "^3.5.29"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react": "^19.2.14",
|
"@types/react": "^19.2.14",
|
||||||
|
|||||||
5738
pnpm-lock.yaml
generated
5738
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user