This commit is contained in:
@@ -12,26 +12,27 @@ jobs:
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ secrets.REPO_HOST }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.DEPLOY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
build-args: |
|
||||
PUBLIC_RSS_TIMEZONE=${{ vars.PUBLIC_RSS_TIMEZONE }}
|
||||
tags: |
|
||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||
${{ 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
|
||||
|
||||
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
|
||||
|
||||
FROM oven/bun:1.3.9-alpine AS base
|
||||
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 \
|
||||
pnpm install --frozen-lockfile || \
|
||||
(sleep 5 && pnpm install --frozen-lockfile) || \
|
||||
(sleep 10 && pnpm install --frozen-lockfile --no-frozen-lockfile)
|
||||
|
||||
FROM deps AS builder
|
||||
|
||||
ARG PUBLIC_RSS_TIMEZONE
|
||||
ENV PUBLIC_RSS_TIMEZONE=${PUBLIC_RSS_TIMEZONE}
|
||||
FROM base AS builder
|
||||
COPY package.json bun.lock ./
|
||||
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
|
||||
bun install --frozen-lockfile || bun install
|
||||
|
||||
COPY . .
|
||||
RUN bun run build
|
||||
|
||||
RUN pnpm run build && \
|
||||
pnpm prune --prod
|
||||
|
||||
FROM node:24-alpine AS runtime
|
||||
|
||||
RUN apk add --no-cache vips libc6-compat
|
||||
|
||||
FROM base AS runtime
|
||||
WORKDIR /app
|
||||
|
||||
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 ./
|
||||
|
||||
ENV HOST=0.0.0.0 \
|
||||
PORT=4321 \
|
||||
NODE_ENV=production
|
||||
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=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 mdx from "@astrojs/mdx";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: "https://atri.dad",
|
||||
redirects: {
|
||||
@@ -26,10 +25,7 @@ export default defineConfig({
|
||||
objectPosition: "center",
|
||||
},
|
||||
|
||||
integrations: [
|
||||
vue(),
|
||||
mdx(),
|
||||
],
|
||||
integrations: [vue(), mdx()],
|
||||
|
||||
adapter: node({
|
||||
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",
|
||||
"type": "module",
|
||||
"version": "4.1.0",
|
||||
"version": "4.2.0",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
@@ -11,18 +11,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@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/vue": "6.0.0-beta.1",
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"@react-pdf/renderer": "^4.3.2",
|
||||
"@tailwindcss/typography": "^0.5.19",
|
||||
"@tailwindcss/vite": "^4.2.1",
|
||||
"astro": "6.0.0-beta.14",
|
||||
"astro": "6.0.0-beta.15",
|
||||
"react": "^19.2.4",
|
||||
"sharp": "^0.34.5",
|
||||
"tailwindcss": "^4.2.1",
|
||||
"vue": "^3.5.28"
|
||||
"vue": "^3.5.29"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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