slidev
slidev copied to clipboard
docs: add docker option to static hosting page
Adds a better and clearer guide to hosting static slides in a Docker container than is described in https://sli.dev/guide/install#install-on-docker
Deploy Preview for slidev ready!
| Name | Link |
|---|---|
| Latest commit | 99d5d9ebe1ff92a6eda4ea9b5641fd19ee089564 |
| Latest deploy log | https://app.netlify.com/sites/slidev/deploys/6670524468fc8c00083a9d15 |
| Deploy Preview | https://deploy-preview-1648--slidev.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Thanks for your contribution!
I know almost nothing about Docker. Could you please also have a look at https://github.com/slidevjs/container? It seems to have lots of bugs.
And could we remove https://sli.dev/guide/install#install-on-docker as it's replaced by this one?
What would the purpose of slidevjs/container be?
Currently slidevjs/container is a bad solution for statically hosting slides, it runs with a node image and never runs slidev build, which means it will never actually build a static website but will run a development server with node.
My commit uses a node image to run slidev build then copies only the dist folder to an apache image for hosting the static
My commit only replaces https://sli.dev/guide/install#build-hostable-spa-single-page-application so maybe remove only that?
What would the purpose of
slidevjs/containerbe? Currentlyslidevjs/containeris a bad solution for statically hosting slides, it runs with a node image and never runsslidev build, which means it will never actually build a static website but will run a development server with node.
The slidevjs/container runs a dev server because the built version doesn't support navigation sync.(#1227)
After #1227 is done, I think there can have a standalone navigation sync server as a Docker image.
My commit only replaces https://sli.dev/guide/install#build-hostable-spa-single-page-application so maybe remove only that?
Yes I think. This existing one seems not quite useful.
There seem to be so many ways to deploy Slidev via docker. AKAIK, there are:
- tangramor/slidev_docker - Run Slidev in dev mode in a container
- slidevjs/container - The same
- In the old docs: installation#host-via-docker - Build on local machine. Docker only serves as an HTTP server
- This PR - Build and serve in Docker
IMO, after #1227 is done, the first two can be replaced by the standalone navigation sync server. The third one seems useless and out of Slidev's scope.