Repository navigation
How to build Solid 2 with Docker? #3792
This question is actuallyHow do I build SSR with Docker or Podman? I'm used toBuilding SPA and static sites with Podman, since it can read Dockerfiles. To my understanding, if it will build on Docker, it will on Podman just fine. Dockerfile used for SPA and static siteThat begs the questionHow do I do that in an SSR-built site? AlternatelyI used |
Replies: 1 comment 1 reply
|
Podman reads that Dockerfile. The nginx stage is the part that only works for a static site. It copies files out of For SolidStart, set the server preset to
|
Solid 2 has a different build outcome. But I finally figured out what the problem was after reading around the solidjs website.
By default, the start.node isn't enabled at the vite plugin. It needs to be set as
solid({ start: { node: true }, ssr: true}).At default
vite.config.tswould look like this:After building, the dist folder will contain
clientandserverfolders. And neither has a file that can be run bynode.To enable
vite.config.tsshould look like this: