Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/deployment/docker/_partials/_dockerfile-npm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Stage 1: Base image.
## Start with a base image containing NodeJS so we can build Docusaurus.
FROM node:lts as base
FROM node:lts AS base
## Disable colour output from yarn to make logs easier to read.
ENV FORCE_COLOR=0
## Enable corepack.
Expand All @@ -12,7 +12,7 @@ RUN corepack enable
WORKDIR /opt/docusaurus

# Stage 2a: Development mode.
FROM base as dev
FROM base AS dev
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Expose the port that Docusaurus will run on.
Expand All @@ -21,7 +21,7 @@ EXPOSE 3000
CMD [ -d "node_modules" ] && npm run start --host 0.0.0.0 --poll 1000 || npm run install && npm run start --host 0.0.0.0 --poll 1000

# Stage 2b: Production build mode.
FROM base as prod
FROM base AS prod
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Copy over the source code.
Expand All @@ -32,14 +32,14 @@ RUN npm ci
RUN npm run build

# Stage 3a: Serve with `docusaurus serve`.
FROM prod as 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"]

# Stage 3b: Serve with Caddy.
FROM caddy:2-alpine as caddy
FROM caddy:2-alpine AS caddy
## Copy the Caddyfile.
COPY --from=prod /opt/docusaurus/Caddyfile /etc/caddy/Caddyfile
## Copy the Docusaurus build output.
Expand Down
10 changes: 5 additions & 5 deletions docs/deployment/docker/_partials/_dockerfile-pnpm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Stage 1: Base image.
## Start with a base image containing NodeJS so we can build Docusaurus.
FROM node:lts as base
FROM node:lts AS base
## Disable colour output from yarn to make logs easier to read.
ENV FORCE_COLOR=0
## Enable corepack.
Expand All @@ -12,7 +12,7 @@ RUN corepack enable
WORKDIR /opt/docusaurus

# Stage 2a: Development mode.
FROM base as dev
FROM base AS dev
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Expose the port that Docusaurus will run on.
Expand All @@ -21,7 +21,7 @@ EXPOSE 3000
CMD [ -d "node_modules" ] && pnpm start --host 0.0.0.0 --poll 1000 || pnpm install && pnpm start --host 0.0.0.0 --poll 1000

# Stage 2b: Production build mode.
FROM base as prod
FROM base AS prod
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Copy over the source code.
Expand All @@ -32,14 +32,14 @@ RUN pnpm install --frozen-lockfile
RUN pnpm build

# Stage 3a: Serve with `docusaurus serve`.
FROM prod as serve
FROM prod AS serve
## Expose the port that Docusaurus will run on.
EXPOSE 3000
## Run the production server.
CMD ["pnpm", "serve", "--host", "0.0.0.0", "--no-open"]

# Stage 3b: Serve with Caddy.
FROM caddy:2-alpine as caddy
FROM caddy:2-alpine AS caddy
## Copy the Caddyfile.
COPY --from=prod /opt/docusaurus/Caddyfile /etc/caddy/Caddyfile
## Copy the Docusaurus build output.
Expand Down
10 changes: 5 additions & 5 deletions docs/deployment/docker/_partials/_dockerfile-yarn.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Stage 1: Base image.
## Start with a base image containing NodeJS so we can build Docusaurus.
FROM node:lts as base
FROM node:lts AS base
## Disable colour output from yarn to make logs easier to read.
ENV FORCE_COLOR=0
## Enable corepack.
Expand All @@ -12,7 +12,7 @@ RUN corepack enable
WORKDIR /opt/docusaurus

# Stage 2a: Development mode.
FROM base as dev
FROM base AS dev
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Expose the port that Docusaurus will run on.
Expand All @@ -21,7 +21,7 @@ EXPOSE 3000
CMD [ -d "node_modules" ] && yarn start --host 0.0.0.0 --poll 1000 || yarn install && yarn start --host 0.0.0.0 --poll 1000

# Stage 2b: Production build mode.
FROM base as prod
FROM base AS prod
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Copy over the source code.
Expand All @@ -32,14 +32,14 @@ RUN yarn install --immutable
RUN yarn build

# Stage 3a: Serve with `docusaurus serve`.
FROM prod as serve
FROM prod AS serve
## Expose the port that Docusaurus will run on.
EXPOSE 3000
## Run the production server.
CMD ["yarn", "serve", "--host", "0.0.0.0", "--no-open"]

# Stage 3b: Serve with Caddy.
FROM caddy:2-alpine as caddy
FROM caddy:2-alpine AS caddy
## Copy the Caddyfile.
COPY --from=prod /opt/docusaurus/Caddyfile /etc/caddy/Caddyfile
## Copy the Docusaurus build output.
Expand Down
Loading