g1t/deploy/self-host/gitstore/Dockerfile
Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Running g1t yourself: the design, a docker compose proof, and a guide to what works today | 1 | # g1t's git store for self-hosting: bare repositories on a volume, served |
| 2 | # by git itself. See server.mjs. | |
| 3 | FROM node:24-bookworm-slim | |
| 4 | RUN apt-get update \ | |
| 5 | && apt-get install -y --no-install-recommends git ca-certificates \ | |
| 6 | && rm -rf /var/lib/apt/lists/* | |
| 7 | WORKDIR /app | |
| 8 | COPY server.mjs ./ | |
| 9 | ENV GITSTORE_ROOT=/data/git GITSTORE_PORT=8080 | |
| 10 | # Owned by the user it runs as, so new volumes are writable. | |
| 11 | RUN mkdir -p /data/git /secrets && chown node:node /data/git /secrets | |
| 12 | VOLUME /data/git | |
| 13 | EXPOSE 8080 | |
| 14 | USER node | |
| 15 | HEALTHCHECK --interval=5s --timeout=3s --retries=20 \ | |
| 16 | CMD node -e "fetch('http://127.0.0.1:8080/healthz').then(r=>process.exit(r.ok?0:1),()=>process.exit(1))" | |
| 17 | CMD ["node", "server.mjs"] |