slidev icon indicating copy to clipboard operation
slidev copied to clipboard

docs: add docker option to static hosting page

Open jakobkordez opened this issue 1 year ago • 5 comments

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

jakobkordez avatar Jun 03 '24 09:06 jakobkordez

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jun 03 '24 09:06 netlify[bot]

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?

kermanx avatar Jun 03 '24 09:06 kermanx

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?

jakobkordez avatar Jun 03 '24 10:06 jakobkordez

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.

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.

kermanx avatar Jun 04 '24 00:06 kermanx

There seem to be so many ways to deploy Slidev via docker. AKAIK, there are:

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.

kermanx avatar Jun 13 '24 02:06 kermanx