use local git repo - basic features seem to work
Some checks are pending
Deploy Next.js site to Pages / build (push) Waiting to run
Deploy Next.js site to Pages / search-tests (push) Blocked by required conditions
Deploy Next.js site to Pages / deploy (push) Blocked by required conditions

This commit is contained in:
Gerhard Scheikl
2026-04-01 20:18:20 +02:00
parent fc107d576c
commit 982f4109cf
7 changed files with 29 additions and 160 deletions

View File

@@ -1,7 +1,7 @@
FROM node:22-alpine AS base
RUN corepack enable
RUN apk add --no-cache libc6-compat
RUN apk add --no-cache libc6-compat git
# --- Dependencies stage ---
FROM base AS deps
@@ -41,6 +41,14 @@ COPY --from=builder /app/public ./public
COPY --from=builder /app/content ./content
COPY --from=builder /app/tina ./tina
# Initialize a local git repo for IsomorphicBridge
# IsomorphicBridge requires a .git directory with at least one commit
RUN git init && \
git config user.email "cms@linumiq.com" && \
git config user.name "TinaCMS" && \
git add -A && \
git commit -m "Initial content"
# Copy the startup indexing script
COPY --from=builder /app/scripts/index-database.mjs ./scripts/index-database.mjs
@@ -48,7 +56,9 @@ COPY --from=builder /app/scripts/index-database.mjs ./scripts/index-database.mjs
COPY --from=builder /app/.next/static/pagefind ./.next/static/pagefind
# Create cache directory with correct permissions
RUN mkdir -p .next/cache && chown -R nextjs:nodejs .next/cache
# IsomorphicBridge needs write access to .git and content for commits
RUN mkdir -p .next/cache && \
chown -R nextjs:nodejs .next/cache .git content tina
USER nextjs