-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1722 from marcellodesales/feature/dockerized-docs…
…-support 🐛 fix plugins.md formatting for docs with dockerized docs validation
- Loading branch information
Showing
5 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
## Modified version of https://docusaurus.community/knowledge/deployment/docker/ | ||
|
||
# Stage 1: Base image. | ||
## Start with a base image containing NodeJS so we can build Docusaurus. | ||
FROM node:23.3.0-slim AS base | ||
## Disable colour output from yarn to make logs easier to read. | ||
|
||
## https://pnpm.io/docker | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
|
||
ENV FORCE_COLOR=0 | ||
## Enable corepack. | ||
RUN corepack enable | ||
## Set the working directory to `/opt/docusaurus`. | ||
WORKDIR /opt/docusaurus | ||
|
||
## Required by docusaurus: [ERROR] Loading of version failed for version current | ||
RUN apt-get update && apt-get install -y git | ||
|
||
FROM base AS dev | ||
## Set the working directory to `/opt/docusaurus`. | ||
WORKDIR /opt/docusaurus | ||
## Expose the port that Docusaurus will run on. | ||
EXPOSE 3000 | ||
## Run the development server. | ||
CMD [ -d "node_modules" ] && npm run start -- --host 0.0.0.0 --poll 1000 || pnpm install && pnpm run start -- --host 0.0.0.0 --poll 1000 | ||
|
||
# Stage 2b: Production build mode. | ||
FROM base AS prod | ||
## Set the working directory to `/opt/docusaurus`. | ||
WORKDIR /opt/docusaurus | ||
|
||
COPY docs/package.json /opt/docusaurus/package.json | ||
COPY docs/package-lock.json /opt/docusaurus/package-lock.json | ||
|
||
## Install dependencies with `--immutable` to ensure reproducibility. | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install | ||
|
||
## Copy over the source code. | ||
COPY docs/ /opt/docusaurus/ | ||
COPY packages/ /opt/packages/ | ||
|
||
## Required buy docusaurus [ERROR] Loading of version failed for version current | ||
COPY .git/ /opt/.git/ | ||
|
||
# Build from sources | ||
RUN pnpm run build | ||
|
||
# Stage 3a: Serve with `docusaurus serve`. | ||
FROM prod AS serve | ||
## Expose the port that Docusaurus will run on. | ||
EXPOSE 3000 | ||
## Run the production server. | ||
CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0", "--no-open"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
services: | ||
docs: | ||
build: | ||
dockerfile: Dockerfile.docs | ||
context: . | ||
target: serve | ||
ports: | ||
- 3000:3000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"name": "eliza-docs", | ||
"version": "0.1.7-alpha.2", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"docusaurus": "docusaurus", | ||
"start": "docusaurus start --no-open", | ||
|
@@ -21,9 +22,11 @@ | |
"@docusaurus/plugin-ideal-image": "3.6.3", | ||
"@docusaurus/preset-classic": "3.6.3", | ||
"@docusaurus/theme-mermaid": "3.6.3", | ||
"@docusaurus/theme-common": "3.6.3", | ||
"@mdx-js/react": "3.0.1", | ||
"clsx": "2.1.1", | ||
"docusaurus-lunr-search": "3.5.0", | ||
"lunr": "2.3.9", | ||
"dotenv": "^16.4.7", | ||
"prism-react-renderer": "2.3.1", | ||
"react": "18.3.1", | ||
|