You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I´m trying to create a dockerimage to serve out vitepress generated files, but the resulting site doesn´t include /vue. So the search function (and others) doesn´t´work.
The docker build is multistage, so first configure the builder and generate the files (in dev mode it works), and then copy the /dist folder (output folder) to /var/www/my-site and use the nginx template in vitepress docs (slightly modified with custom folders)
Describe the bug
Hi,
I´m trying to create a dockerimage to serve out vitepress generated files, but the resulting site doesn´t include /vue. So the search function (and others) doesn´t´work.
The docker build is multistage, so first configure the builder and generate the files (in dev mode it works), and then copy the /dist folder (output folder) to /var/www/my-site and use the nginx template in vitepress docs (slightly modified with custom folders)
Reproduction
FROM node:current-alpine as builder
WORKDIR /builder
RUN apk update
COPY /.site/package.json /builder/
COPY /.site/.vitepress/config.mts /builder/.vitepress/
COPY --exclude=/.site/ --exclude=.github/ --exclude=.gitignore --exclude=Dockerfile --exclude=.git/ . /builder/docs/
RUN npm install
RUN npm run docs:build
FROM nginx:1.27.1-alpine
COPY --from=builder /builder/.vitepress/dist /var/www/docs
RUN chown -R nginx:nginx /var/www/ -R
COPY ./.site/nginx/nginx.conf /etc/nginx/conf.d/default.conf
Expected behavior
The site should work as in dev mode (vue components work as intended)
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: