- Dockerfile: install git + openssh-client in runtime image; pre-populate /root/.ssh/known_hosts with the Tailscale ssh-keyscan for 100.114.205.53:2222 (Gitea SSH). Without these, the bootstrap push step from inside the container fails with "command not found" or host-key prompts. - docker-compose.yml: mount ./secrets/boocode_gitea as /root/.ssh/id_ed25519:ro so the container can authenticate to Gitea over SSH for the initial push. - .gitignore: add secrets/ so the keypair never lands in the repo. - project_bootstrap.ts: rewrite the Gitea-returned ssh_url's hostname from git.indifferentketchup.com to 100.114.205.53 before adding it as origin, so the push hits the Tailscale interface that the known_hosts entry covers. - CreateProjectModal.tsx: preview label now reads "Folder: /opt/projects/<name>" to match the new BOOTSTRAP_ROOT (was /opt/). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34 lines
889 B
Docker
34 lines
889 B
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
FROM node:20-alpine AS builder
|
|
RUN corepack enable
|
|
WORKDIR /build
|
|
|
|
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml tsconfig.base.json ./
|
|
COPY apps/server/package.json ./apps/server/
|
|
COPY apps/web/package.json ./apps/web/
|
|
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
COPY apps/server ./apps/server
|
|
COPY apps/web ./apps/web
|
|
|
|
RUN pnpm build
|
|
|
|
RUN pnpm deploy --filter=@boocode/server --prod --legacy /out/server
|
|
|
|
|
|
FROM node:20-alpine AS runtime
|
|
RUN apk add --no-cache ripgrep git openssh-client
|
|
RUN mkdir -p /root/.ssh && ssh-keyscan -p 2222 -H 100.114.205.53 git.indifferentketchup.com >> /root/.ssh/known_hosts && chmod 700 /root/.ssh && chmod 600 /root/.ssh/known_hosts
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /out/server ./
|
|
COPY --from=builder /build/apps/web/dist ./web
|
|
|
|
ENV NODE_ENV=production
|
|
ENV WEB_DIST_PATH=/app/web
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "dist/index.js"]
|