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
2 changes: 1 addition & 1 deletion docs/deployment/docker/_partials/_dockerfile-npm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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 || npm run install && npm run start --host 0.0.0.0 --poll 1000
CMD [ -d "node_modules" ] && npm run start -- --host 0.0.0.0 --poll 1000 || npm install && npm run start -- --host 0.0.0.0 --poll 1000

# Stage 2b: Production build mode.
FROM base as prod
Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/docker/_partials/_dockerfile-pnpm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ WORKDIR /opt/docusaurus
## Expose the port that Docusaurus will run on.
EXPOSE 3000
## Run the development server.
CMD [ -d "node_modules" ] && pnpm start --host 0.0.0.0 --poll 1000 || pnpm install && pnpm start --host 0.0.0.0 --poll 1000
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
Expand All @@ -36,7 +36,7 @@ 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"]
CMD ["pnpm", "serve", "--", "--host", "0.0.0.0", "--no-open"]

# Stage 3b: Serve with Caddy.
FROM caddy:2-alpine as caddy
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/docker/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Depending on stage / target you will need to run the docker image differently.
To run the `dev` target you will need to run the following command:

```bash
docker run --rm -d -p 3000:3000 -v $(pwd):/var/docusaurus <tag>
docker run --rm -d -p 3000:3000 -v $(pwd):/opt/docusaurus <tag>
```

If using PowerShell you will need to use `${pwd}` instead of `$(pwd)`. On some systems you may need to replace `$(pwd)` with `.` or the full path to the directory you want to mount.
Expand Down
Loading