diff --git a/builder/Dockerfile b/Dockerfile similarity index 61% rename from builder/Dockerfile rename to Dockerfile index a48beee..8c51924 100644 --- a/builder/Dockerfile +++ b/Dockerfile @@ -6,11 +6,11 @@ RUN apt-get update && apt-get install -y git RUN git clone https://github.com/MicroWebStacks/astro-big-doc.git /astro-big-doc WORKDIR /astro-big-doc -# Install RUN pnpm install -# Copy scripts into the container -COPY build.sh build.sh +EXPOSE 3001 -# Set build.sh as the entrypoint -ENTRYPOINT ["./build.sh"] +RUN pnpm astro telemetry disable + +ENTRYPOINT ["pnpm", "run"] +CMD ["build"] diff --git a/builder/build.sh b/builder/build.sh deleted file mode 100644 index 75cdb87..0000000 --- a/builder/build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Navigate into the astro-big-doc directory -cd /astro-big-doc - -# Build the site -pnpm run build diff --git a/docker-compose.yaml b/docker-compose.yaml index 334be11..5d0d4cc 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,11 +1,12 @@ version: "3.8" services: - astro-doc-builder: - build: ./builder + astro-doc: + build: . volumes: - ./content:/astro-big-doc/content - ./public:/astro-big-doc/public - ./menu.yaml:/astro-big-doc/menu.yaml - ./dist:/astro-big-doc/dist container_name: astro-doc-builder + network_mode: host diff --git a/run.cmd b/run.cmd new file mode 100644 index 0000000..b8df9e2 --- /dev/null +++ b/run.cmd @@ -0,0 +1,12 @@ +@echo off +setlocal + +:: Default command if no argument is provided +set COMMAND=build + +:: Check if an argument is provided and use it as the command +if not "%~1"=="" set COMMAND=%~1 + +:: Run the Docker Compose command +docker-compose run --rm astro-doc %COMMAND% +endlocal