use local git repo - basic features seem to work
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user