feat: TypeScript bastion rewrite (initial scaffold)
Full rewrite of the bash bastion.sh into a TypeScript application: - Fastify HTTP server with typed routes (dispatch, kickstart, API) - Commander CLI (serve, install, list, reprovision) - Kickstart templates as TypeScript template literals (no more heredoc hell) - dnsmasq management via execa subprocess - Merged machine list view (hardware + install info in one table) - Containerized via podman-compose (Dockerfile + docker-compose.yml) - All partition logic preserved (LVM, reprovision detection, role-based) Not yet tested end-to-end — needs VM validation before replacing bash version. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
37
bastion/stack/Dockerfile
Normal file
37
bastion/stack/Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
FROM fedora:43
|
||||
|
||||
# Install system dependencies
|
||||
RUN dnf install -y \
|
||||
dnsmasq \
|
||||
ipxe-bootimgs-x86 \
|
||||
ipxe-bootimgs-aarch64 \
|
||||
curl \
|
||||
openssh-clients \
|
||||
&& dnf clean all
|
||||
|
||||
# Install Node.js 22
|
||||
RUN dnf install -y nodejs npm && dnf clean all
|
||||
RUN npm install -g pnpm@9
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files and install dependencies
|
||||
COPY package.json pnpm-lock.yaml* ./
|
||||
RUN pnpm install --frozen-lockfile 2>/dev/null || pnpm install
|
||||
|
||||
# Copy built application
|
||||
COPY dist/ ./dist/
|
||||
|
||||
# Create data directories
|
||||
RUN mkdir -p /data/state /data/tftp /data/http
|
||||
|
||||
ENV BASTION_DIR=/data
|
||||
ENV HTTP_PORT=8080
|
||||
|
||||
EXPOSE 8080/tcp
|
||||
EXPOSE 67/udp
|
||||
EXPOSE 69/udp
|
||||
EXPOSE 4011/udp
|
||||
|
||||
ENTRYPOINT ["node", "dist/cli/index.js", "serve"]
|
||||
Reference in New Issue
Block a user