diff --git a/src/SUMMARY.md b/src/SUMMARY.md
index c880973..6387ca1 100644
--- a/src/SUMMARY.md
+++ b/src/SUMMARY.md
@@ -49,6 +49,8 @@
- [Progressive Enhancement and Graceful Degradation](./progressive_enhancement/README.md)
- [` `s](./progressive_enhancement/action_form.md)
- [Deployment](./deployment/README.md)
+ - [Deploying CSR Apps](./deployment/csr.md)
+ - [Deploying SSR Apps](./deployment/ssr.md)
- [Optimizing WASM Binary Size](./deployment/binary_size.md)
- [Guide: Islands](./islands.md)
diff --git a/src/deployment/README.md b/src/deployment/README.md
index fa6c204..1738e15 100644
--- a/src/deployment/README.md
+++ b/src/deployment/README.md
@@ -10,65 +10,3 @@ There are as many ways to deploy a web application as there are developers, let
> We asked users to submit their deployment setups to help with this chapter. I’ll quote from them below, but you can read the full thread [here](https://github.com/leptos-rs/leptos/issues/1152).
-## Deploying a Client-Side-Rendered App
-
-If you’ve been building an app that only uses client-side rendering, working with Trunk as a dev server and build tool, the process is quite easy.
-
-```bash
-trunk build --release
-```
-
-`trunk build` will create a number of build artifacts in a `dist/` directory. Publishing `dist` somewhere online should be all you need to deploy your app. This should work very similarly to deploying any JavaScript application.
-
-> Read more: [Deploying to Vercel with GitHub Actions](https://github.com/leptos-rs/leptos/issues/1152#issuecomment-1577861900).
-
-## Deploying a Full-Stack App
-
-The most popular way for people to deploy full-stack apps built with `cargo-leptos` is to use a cloud hosting service that supports deployment via a Docker build. Here’s a sample `Dockerfile`, which is based on the one we use to deploy the Leptos website.
-
-```dockerfile
-# Get started with a build env with Rust nightly
-FROM rustlang/rust:nightly-bullseye as builder
-
-# If you’re using stable, use this instead
-# FROM rust:1.70-bullseye as builder
-
-# Install cargo-binstall, which makes it easier to install other
-# cargo extensions like cargo-leptos
-RUN wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
-RUN tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
-RUN cp cargo-binstall /usr/local/cargo/bin
-
-# Install cargo-leptos
-RUN cargo binstall cargo-leptos -y
-
-# Add the WASM target
-RUN rustup target add wasm32-unknown-unknown
-
-# Make an /app dir, which everything will eventually live in
-RUN mkdir -p /app
-WORKDIR /app
-COPY . .
-
-# Build the app
-RUN cargo leptos build --release -vv
-
-FROM rustlang/rust:nightly-bullseye as runner
-# Copy the server binary to the /app directory
-COPY --from=builder /app/target/release/leptos-start /app/
-# /target/site contains our JS/WASM/CSS, etc.
-COPY --from=builder /app/target/site /app/site
-# Copy Cargo.toml if it’s needed at runtime
-COPY --from=builder /app/Cargo.toml /app/
-WORKDIR /app
-
-# Set any required env variables and
-ENV RUST_LOG="info"
-ENV LEPTOS_SITE_ADDR="0.0.0.0:8080"
-ENV LEPTOS_SITE_ROOT="site"
-EXPOSE 8080
-# Run the server
-CMD ["/app/leptos_start"]
-```
-
-> Read more: [`gnu` and `musl` build files for Leptos apps](https://github.com/leptos-rs/leptos/issues/1152#issuecomment-1634916088).
diff --git a/src/deployment/csr.md b/src/deployment/csr.md
new file mode 100644
index 0000000..0cc76d3
--- /dev/null
+++ b/src/deployment/csr.md
@@ -0,0 +1,534 @@
+# Deploying a Client-Side-Rendered App
+
+If you’ve been building an app that only uses client-side rendering, working with Trunk as a dev server and build tool, the process is quite easy.
+
+```bash
+trunk build --release
+```
+
+`trunk build` will create a number of build artifacts in a `dist/` directory. Publishing `dist` somewhere online should be all you need to deploy your app. This should work very similarly to deploying any JavaScript application.
+
+We've created several example repositories which show how to set up and deploy a Leptos CSR app to various hosting services.
+
+*Note: Leptos does not endorse the use of any particular hosting service - feel free to use any service that supports static site deploys.*
+
+Examples:
+- [Github Pages](#github-pages)
+- [Vercel](#vercel)
+- [Spin (serverless WebAssembly)](#spin---serverless-webassembly)
+
+
+## Github Pages
+
+Deploying a Leptos CSR app to Github pages is a simple affair. First, go to your Github repo's settings and click on "Pages" in the left side menu. In the "Build and deployment" section of the page, change the "source" to "Github Actions". Then copy the following into a file such as `.github/workflows/gh-pages-deploy.yml`
+
+```admonish example collapsible=true
+
+ name: Release to Github Pages
+
+ on:
+ push:
+ branches: [main]
+ workflow_dispatch:
+
+ permissions:
+ contents: write # for committing to gh-pages branch.
+ pages: write
+ id-token: write
+
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+ concurrency:
+ group: "pages"
+ cancel-in-progress: false
+
+ jobs:
+ Github-Pages-Release:
+
+ timeout-minutes: 10
+
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4 # repo checkout
+
+ # Install Rust Nightly Toolchain, with Clippy & Rustfmt
+ - name: Install nightly Rust
+ uses: dtolnay/rust-toolchain@nightly
+ with:
+ components: clippy, rustfmt
+
+ - name: Add WASM target
+ run: rustup target add wasm32-unknown-unknown
+
+ - name: lint
+ run: cargo clippy & cargo fmt
+
+
+ # If using tailwind...
+ # - name: Download and install tailwindcss binary
+ # run: npm install -D tailwindcss && npx tailwindcss -i -o # run tailwind
+
+
+ - name: Download and install Trunk binary
+ run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.18.2/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
+
+ - name: Build with Trunk
+ # "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository
+ # using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico .
+ # this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested
+ # relatively as favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
+ # will obviously return error 404 not found.
+ run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}"
+
+
+ # Deploy to gh-pages branch
+ # - name: Deploy 🚀
+ # uses: JamesIves/github-pages-deploy-action@v4
+ # with:
+ # folder: dist
+
+
+ # Deploy with Github Static Pages
+
+ - name: Setup Pages
+ uses: actions/configure-pages@v4
+ with:
+ enablement: true
+ # token:
+
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v2
+ with:
+ # Upload dist dir
+ path: './dist'
+
+ - name: Deploy to GitHub Pages 🚀
+ id: deployment
+ uses: actions/deploy-pages@v3
+
+```
+
+For more on deploying to Github Pages [see the example repo here](https://github.com/diversable/deploy_leptos_csr_to_gh_pages)
+
+## Vercel
+
+### Step 1: Set Up Vercel
+
+In the Vercel Web UI...
+1. Create a new project
+2. Ensure
+ - The "Build Command" is left empty with Override on
+ - The "Output Directory" is changed to dist (which is the default output directory for Trunk builds) and the Override is on
+
+
+
+
+
+### Step 2: Add Vercel Credentials for GitHub Actions
+
+Note: Both the preview and deploy actions will need your Vercel credentials setup in GitHub secrets
+
+1. Retrieve your [Vercel Access Token](https://vercel.com/guides/how-do-i-use-a-vercel-api-access-token) by going to "Account Settings" > "Tokens" and creating a new token - save the token to use in sub-step 5, below.
+
+2. Install the [Vercel CLI](https://vercel.com/cli) using the `npm i -g vercel` command, then run `vercel login` to login to your acccount.
+
+3. Inside your folder, run `vercel link` to create a new Vercel project; in the CLI, you will be asked to 'Link to an existing project?' - answer yes, then enter the name you created in step 1. A new `.vercel` folder will be created for you.
+
+4. Inside the generated `.vercel` folder, open the the `project.json` file and save the "projectId" and "orgId" for the next step.
+
+5. Inside GitHub, go the repo's "Settings" > "Secrets and Variables" > "Actions" and add the following as [Repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets):
+ - save your Vercel Access Token (from sub-step 1) as the `VERCEL_TOKEN` secret
+ - from the `.vercel/project.json` add "projectID" as `VERCEL_PROJECT_ID`
+ - from the `.vercel/project.json` add "orgId" as `VERCEL_ORG_ID`
+
+For full instructions see ["How can I use Github Actions with Vercel"](https://vercel.com/guides/how-can-i-use-github-actions-with-vercel)
+
+### Step 3: Add Github Action Scripts
+
+Finally, you're ready to simply copy and paste the two files - one for deployment, one for PR previews - from below or from [the example repo's `.github/workflows/` folder](https://github.com/diversable/vercel-leptos-CSR-deployment/tree/main/.github/workflows) into your own github workflows folder - then, on your next commit or PR deploys will occur automatically.
+
+
+Production deployment script: `vercel_deploy.yml`
+
+```admonish example collapsible=true
+
+ name: Release to Vercel
+
+ on:
+ push:
+ branches:
+ - main
+ env:
+ CARGO_TERM_COLOR: always
+ VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
+ VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
+
+ jobs:
+ Vercel-Production-Deployment:
+ runs-on: ubuntu-latest
+ environment: production
+ steps:
+ - name: git-checkout
+ uses: actions/checkout@v3
+
+ - uses: dtolnay/rust-toolchain@nightly
+ with:
+ components: clippy, rustfmt
+ - uses: Swatinem/rust-cache@v2
+ - name: Setup Rust
+ run: |
+ rustup target add wasm32-unknown-unknown
+ cargo clippy
+ cargo fmt --check
+
+ - name: Download and install Trunk binary
+ run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.18.2/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
+
+
+ - name: Build with Trunk
+ run: ./trunk build --release
+
+ - name: Install Vercel CLI
+ run: npm install --global vercel@latest
+
+ - name: Pull Vercel Environment Information
+ run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
+
+ - name: Deploy to Vercel & Display URL
+ id: deployment
+ working-directory: ./dist
+ run: |
+ vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }} >> $GITHUB_STEP_SUMMARY
+ echo $GITHUB_STEP_SUMMARY
+
+```
+
+Preview deployments script: `vercel_preview.yml`
+
+```admonish example collapsible=true
+
+ # For more info re: vercel action see:
+ # https://github.com/amondnet/vercel-action
+
+ name: Leptos CSR Vercel Preview
+
+ on:
+ pull_request:
+ branches: [ "main" ]
+
+ workflow_dispatch:
+
+ env:
+ CARGO_TERM_COLOR: always
+ VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
+ VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
+
+ jobs:
+ fmt:
+ name: Rustfmt
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@nightly
+ with:
+ components: rustfmt
+ - name: Enforce formatting
+ run: cargo fmt --check
+
+ clippy:
+ name: Clippy
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@nightly
+ with:
+ components: clippy
+ - uses: Swatinem/rust-cache@v2
+ - name: Linting
+ run: cargo clippy -- -D warnings
+
+ test:
+ name: Test
+ runs-on: ubuntu-latest
+ needs: [fmt, clippy]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@nightly
+ - uses: Swatinem/rust-cache@v2
+ - name: Run tests
+ run: cargo test
+
+ build-and-preview-deploy:
+ runs-on: ubuntu-latest
+ name: Build and Preview
+
+ needs: [test, clippy, fmt]
+
+ permissions:
+ pull-requests: write
+
+ environment:
+ name: preview
+ url: ${{ steps.preview.outputs.preview-url }}
+
+ steps:
+ - name: git-checkout
+ uses: actions/checkout@v4
+
+ - uses: dtolnay/rust-toolchain@nightly
+ - uses: Swatinem/rust-cache@v2
+ - name: Build
+ run: rustup target add wasm32-unknown-unknown
+
+ - name: Download and install Trunk binary
+ run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.18.2/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
+
+
+ - name: Build with Trunk
+ run: ./trunk build --release
+
+ - name: Preview Deploy
+ id: preview
+ uses: amondnet/vercel-action@v25.1.1
+ with:
+ vercel-token: ${{ secrets.VERCEL_TOKEN }}
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
+ vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
+ github-comment: true
+ working-directory: ./dist
+
+ - name: Display Deployed URL
+ run: |
+ echo "Deployed app URL: ${{ steps.preview.outputs.preview-url }}" >> $GITHUB_STEP_SUMMARY
+
+
+```
+
+
+See [the example repo here](https://github.com/diversable/vercel-leptos-CSR-deployment) for more.
+
+
+
+## Spin - Serverless WebAssembly
+
+Another option is using a serverless platform such as Spin. Although [Spin](https://github.com/fermyon/spin) is open source and you can run it on your own infrastructure (eg. inside Kubernetes), the easiest way to get started with Spin in production is to use the Fermyon Cloud.
+
+Start by installing the [Spin CLI using the instructions, here](https://developer.fermyon.com/spin/v2/install), and creating a Github repo for your Leptos CSR project, if you haven't done so already.
+
+1. Open "Fermyon Cloud" > "User Settings". If you’re not logged in, choose the Login With GitHub button.
+
+2. In the “Personal Access Tokens”, choose “Add a Token”. Enter the name “gh_actions” and click “Create Token”.
+
+3. Fermyon Cloud displays the token; click the copy button to copy it to your clipboard.
+
+4. Go into your Github repo and open "Settings" > "Secrets and Variables" > "Actions" and add the Fermyon cloud token to "Repository secrets" using the variable name "FERMYON_CLOUD_TOKEN"
+
+5. Copy and paste the following Github Actions scripts (below) into your `.github/workflows/.yml` files
+
+6. With the 'preview' and 'deploy' scripts active, Github Actions will now generate previews on pull requests & deploy automatically on updates to your 'main' branch.
+
+
+Production deployment script: `spin_deploy.yml`
+```admonish example collapsible=true
+
+ # For setup instructions needed for Fermyon Cloud, see:
+ # https://developer.fermyon.com/cloud/github-actions
+
+ # For reference, see:
+ # https://developer.fermyon.com/cloud/changelog/gh-actions-spin-deploy
+
+ # For the Fermyon gh actions themselves, see:
+ # https://github.com/fermyon/actions
+
+ name: Release to Spin Cloud
+
+ on:
+ push:
+ branches: [main]
+ workflow_dispatch:
+
+ permissions:
+ contents: read
+ id-token: write
+
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+ concurrency:
+ group: "spin"
+ cancel-in-progress: false
+
+ jobs:
+ Spin-Release:
+
+ timeout-minutes: 10
+
+ environment:
+ name: production
+ url: ${{ steps.deployment.outputs.app-url }}
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4 # repo checkout
+
+ # Install Rust Nightly Toolchain, with Clippy & Rustfmt
+ - name: Install nightly Rust
+ uses: dtolnay/rust-toolchain@nightly
+ with:
+ components: clippy, rustfmt
+
+ - name: Add WASM & WASI targets
+ run: rustup target add wasm32-unknown-unknown && rustup target add wasm32-wasi
+
+ - name: lint
+ run: cargo clippy & cargo fmt
+
+
+ # If using tailwind...
+ # - name: Download and install tailwindcss binary
+ # run: npm install -D tailwindcss && npx tailwindcss -i -o # run tailwind
+
+
+ - name: Download and install Trunk binary
+ run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.18.2/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
+
+
+ - name: Build with Trunk
+ run: ./trunk build --release
+
+
+ # Install Spin CLI & Deploy
+
+ - name: Setup Spin
+ uses: fermyon/actions/spin/setup@v1
+ # with:
+ # plugins:
+
+
+ - name: Build and deploy
+ id: deployment
+ uses: fermyon/actions/spin/deploy@v1
+ with:
+ fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }}
+ # key_values: |-
+ # abc=xyz
+ # foo=bar
+ # variables: |-
+ # password=${{ secrets.SECURE_PASSWORD }}
+ # apikey=${{ secrets.API_KEY }}
+
+ # Create an explicit message to display the URL of the deployed app, as well as in the job graph
+ - name: Deployed URL
+ run: |
+ echo "Deployed app URL: ${{ steps.deployment.outputs.app-url }}" >> $GITHUB_STEP_SUMMARY
+
+```
+
+Preview deployment script: `spin_preview.yml`
+
+```admonish example collapsible=true
+
+ # For setup instructions needed for Fermyon Cloud, see:
+ # https://developer.fermyon.com/cloud/github-actions
+
+
+ # For the Fermyon gh actions themselves, see:
+ # https://github.com/fermyon/actions
+
+ # Specifically:
+ # https://github.com/fermyon/actions?tab=readme-ov-file#deploy-preview-of-spin-app-to-fermyon-cloud---fermyonactionsspinpreviewv1
+
+ name: Preview on Spin Cloud
+
+ on:
+ pull_request:
+ branches: ["main", "v*"]
+ types: ['opened', 'synchronize', 'reopened', 'closed']
+ workflow_dispatch:
+
+ permissions:
+ contents: read
+ pull-requests: write
+
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+ concurrency:
+ group: "spin"
+ cancel-in-progress: false
+
+ jobs:
+ Spin-Preview:
+
+ timeout-minutes: 10
+
+ environment:
+ name: preview
+ url: ${{ steps.preview.outputs.app-url }}
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4 # repo checkout
+
+ # Install Rust Nightly Toolchain, with Clippy & Rustfmt
+ - name: Install nightly Rust
+ uses: dtolnay/rust-toolchain@nightly
+ with:
+ components: clippy, rustfmt
+
+ - name: Add WASM & WASI targets
+ run: rustup target add wasm32-unknown-unknown && rustup target add wasm32-wasi
+
+ - name: lint
+ run: cargo clippy & cargo fmt
+
+
+ # If using tailwind...
+ # - name: Download and install tailwindcss binary
+ # run: npm install -D tailwindcss && npx tailwindcss -i -o # run tailwind
+
+
+ - name: Download and install Trunk binary
+ run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.18.2/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
+
+
+ - name: Build with Trunk
+ run: ./trunk build --release
+
+
+ # Install Spin CLI & Deploy
+
+ - name: Setup Spin
+ uses: fermyon/actions/spin/setup@v1
+ # with:
+ # plugins:
+
+
+ - name: Build and preview
+ id: preview
+ uses: fermyon/actions/spin/preview@v1
+ with:
+ fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }}
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ undeploy: ${{ github.event.pull_request && github.event.action == 'closed' }}
+ # key_values: |-
+ # abc=xyz
+ # foo=bar
+ # variables: |-
+ # password=${{ secrets.SECURE_PASSWORD }}
+ # apikey=${{ secrets.API_KEY }}
+
+
+ - name: Display Deployed URL
+ run: |
+ echo "Deployed app URL: ${{ steps.preview.outputs.app-url }}" >> $GITHUB_STEP_SUMMARY
+
+```
+
+See [the example repo here](https://github.com/diversable/leptos-spin-CSR).
\ No newline at end of file
diff --git a/src/deployment/image.png b/src/deployment/image.png
new file mode 100644
index 0000000..8a68c02
Binary files /dev/null and b/src/deployment/image.png differ
diff --git a/src/deployment/ssr.md b/src/deployment/ssr.md
new file mode 100644
index 0000000..912658f
--- /dev/null
+++ b/src/deployment/ssr.md
@@ -0,0 +1,193 @@
+# Deploying a Full-Stack SSR App
+
+It's possible to deploy Leptos fullstack, SSR apps to any number of server or container hosting services. The most simple way to get a Leptos SSR app into production might be to use a VPS service and either run Leptos natively in a VM ([see here for more details](https://github.com/leptos-rs/start-axum?tab=readme-ov-file#executing-a-server-on-a-remote-machine-without-the-toolchain)). Alternatively, you could containerize your Leptos app and run it in [Podman](https://podman.io/) or [Docker](https://www.docker.com/) on any colocated or cloud server.
+
+There are a multitude of different deployment setups and hosting services, and in general, Leptos itself is agnostic to the deployment setup you use. With this diversity of deployment targets in mind, on this page we will go over:
+- [creating a `Containerfile` (or `Dockerfile`) for use with Leptos SSR apps](#creating-a-containerfile)
+- Using a `Dockerfile` to [deploy to a cloud service](#cloud-deployments) - [for example, Fly.io](#deploy-to-flyio)
+- Deploying Leptos to [serverless runtimes](#deploy-to-serverless-runtimes) - for example, [AWS Lambda](#aws-lambda) and [JS-hosted WASM runtimes like Deno & Cloudflare](#deno--cloudflare-workers)
+- [Platforms that have not yet gained Leptos SSR support](#currently-unsupported-platforms)
+
+*Note: Leptos does not endorse the use of any particular method of deployment or hosting service.*
+
+## Creating a Containerfile
+
+The most popular way for people to deploy full-stack apps built with `cargo-leptos` is to use a cloud hosting service that supports deployment via a Podman or Docker build. Here’s a sample `Containerfile` / `Dockerfile`, which is based on the one we use to deploy the Leptos website.
+
+```dockerfile
+# Get started with a build env with Rust nightly
+FROM rustlang/rust:nightly-bullseye as builder
+
+# If you’re using stable, use this instead
+# FROM rust:1.74-bullseye as builder
+
+# Install cargo-binstall, which makes it easier to install other
+# cargo extensions like cargo-leptos
+RUN wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+RUN tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
+RUN cp cargo-binstall /usr/local/cargo/bin
+
+# Install cargo-leptos
+RUN cargo binstall cargo-leptos -y
+
+# Add the WASM target
+RUN rustup target add wasm32-unknown-unknown
+
+# Make an /app dir, which everything will eventually live in
+RUN mkdir -p /app
+WORKDIR /app
+COPY . .
+
+# Build the app
+RUN cargo leptos build --release -vv
+
+FROM rustlang/rust:nightly-bullseye as runner
+
+# -- NB: update binary name from "leptos_start" to match your app name in Cargo.toml --
+# Copy the server binary to the /app directory
+COPY --from=builder /app/target/release/leptos_start /app/
+
+# /target/site contains our JS/WASM/CSS, etc.
+COPY --from=builder /app/target/site /app/site
+# Copy Cargo.toml if it’s needed at runtime
+COPY --from=builder /app/Cargo.toml /app/
+WORKDIR /app
+
+# Set any required env variables and
+ENV RUST_LOG="info"
+ENV LEPTOS_SITE_ADDR="0.0.0.0:8080"
+ENV LEPTOS_SITE_ROOT="site"
+EXPOSE 8080
+
+# -- NB: update binary name from "leptos_start" to match your app name in Cargo.toml --
+# Run the server
+CMD ["/app/leptos_start"]
+```
+
+> Read more: [`gnu` and `musl` build files for Leptos apps](https://github.com/leptos-rs/leptos/issues/1152#issuecomment-1634916088).
+
+
+## Cloud Deployments
+
+### Deploy to Fly.io
+
+One option for deploying your Leptos SSR app is to use a service like [Fly.io](https://fly.io/), which takes a Dockerfile definition of your Leptos app and runs it in a quick-starting micro-VM; Fly also offers a variety of storage options and managed DBs to use with your projects. The following example will show how to deploy a simple Leptos starter app, just to get you up and going; [see here for more about working with storage options on Fly.io](https://fly.io/docs/database-storage-guides/) if and when required.
+
+First, create a `Dockerfile` in the root of your application and fill it in with the suggested contents (above); make sure to update the binary names in the Dockerfile example
+to the name of your own application, and make other adjustments as necessary.
+
+Also, ensure you have the `flyctl` CLI tool installed, and have an account set up at [Fly.io](https://fly.io/). To install `flyctl` on MacOS, Linux, or Windows WSL, run:
+
+```sh
+curl -L https://fly.io/install.sh | sh
+```
+
+If you have issues, or for installing to other platforms [see the full instructions here](https://fly.io/docs/hands-on/install-flyctl/)
+
+Then login to Fly.io
+
+```sh
+fly auth login
+```
+
+and manually launch your app using the command
+
+```sh
+fly launch
+```
+
+The `flyctl` CLI tool will walk you through the process of deploying your app to Fly.io.
+
+```admonish note
+By default, Fly.io will auto-stop machines that don't have traffic coming to them after a certain period of time. Although Fly.io's lightweight VM's start up quickly, if you want to minimize the latency of your Leptos app and ensure it's always swift to respond, go into the generated `fly.toml` file and change the `min_machines_running` to 1 from the default of 0.
+
+[See this page in the Fly.io docs for more details](https://fly.io/docs/apps/autostart-stop/).
+```
+
+If you would prefer to use Github Actions to manage your deployments, you will need to create a new access token via the [Fly.io](https://fly.io/) web UI.
+
+Go to "Account" > "Access Tokens" and create a token named something like "github_actions", then add the token to your Github repo's secrets by going into your project's Github repo, then clicking
+"Settings" > "Secrets and Variables" > "Actions" and creating a "New repository secret" with the name "FLY_API_TOKEN".
+
+To generate a `fly.toml` config file for deployment to Fly.io, you must first run the following from within the project source directory
+
+```sh
+fly launch --no-deploy
+```
+
+to create a new Fly app and register it with the service. Git commit your new `fly.toml` file.
+
+To set up the Github Actions deployment workflow, copy the following into a `.github/workflows/fly_deploy.yml` file:
+
+
+```admonish example collapsible=true
+
+ # For more details, see: https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
+
+ name: Deploy to Fly.io
+ on:
+ push:
+ branches:
+ - main
+ jobs:
+ deploy:
+ name: Deploy app
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: superfly/flyctl-actions/setup-flyctl@master
+ - name: Deploy to fly
+ id: deployment
+ run: |
+ flyctl deploy --remote-only | tail -n 1 >> $GITHUB_STEP_SUMMARY
+ env:
+ FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
+
+```
+
+On the next commit to your Github `main` branch, your project will automatically deploy to Fly.io.
+
+See [the example repo here](https://github.com/diversable/fly-io-leptos-ssr-test-deploy).
+
+
+## Deploy to Serverless Runtimes
+
+Leptos supports deploying to FaaS (Function as a Service) or 'serverless' runtimes such as AWS Lambda as well as [WinterCG](https://wintercg.org/)-compatible JS runtimes such as [Deno](https://deno.com/deploy) and Cloudflare. Just be aware that serverless environments do place some restrictions on the functionality available to your SSR app when compared with VM or container type deployments (see notes, below).
+
+### AWS Lambda
+
+With a little help from the [Cargo Lambda](https://www.cargo-lambda.info/) tool, Leptos SSR apps can be deployed to AWS Lambda. A starter template repo using Axum as the server is available at [leptos-rs/start-aws](https://github.com/leptos-rs/start-aws); the instructions there can be adapted for you to use a Leptos+Actix-web server as well. The starter repo includes a Github Actions script for CI/CD, as well as instructions for setting up your Lambda functions and getting the necessary credentials for cloud deployment.
+
+However, please keep in mind that some native server functionality does not work with FaaS services like Lambda because the environment is not necessarily consistent from one request to the next. In particular, the ['start-aws' docs](https://github.com/leptos-rs/start-aws#state) state that "since AWS Lambda is a serverless platform, you'll need to be more careful about how you manage long-lived state. Writing to disk or using a state extractor will not work reliably across requests. Instead, you'll need a database or other microservices that you can query from the Lambda function."
+
+The other factor to bear in mind is the 'cold-start' time for functions as a service - depending on your use case and the FaaS platform you use, this may or may not meet your latency requirements; you may need to keep one function running at all times to optimize the speed of your requests.
+
+
+
+### Deno & Cloudflare Workers
+
+Currently, Leptos-Axum supports running in Javascript-hosted WebAssembly runtimes such as Deno, Cloudflare Workers, etc. This option requires some changes to the setup of your source code (for example, in `Cargo.toml` you must define your app using `crate-type = ["cdylib"]` and the "wasm" feature must be enabled for `leptos_axum`). [The Leptos HackerNews JS-fetch example](https://github.com/leptos-rs/leptos/tree/main/examples/hackernews_js_fetch) demonstrates the required modifications and shows how to run an app in the Deno runtime. Additionally, the [`leptos_axum` crate docs](https://docs.rs/leptos_axum/latest/leptos_axum/#js-fetch-integration) are a helpful reference when setting up your own `Cargo.toml` file for JS-hosted WASM runtimes.
+
+While the initial setup for JS-hosted WASM runtimes is not onerous, the more important restriction to keep in mind is that since your app will be compiled to WebAssembly (`wasm32-unknown-unknown`) on the server as well as the client, you must ensure that the crates you use in your app are all WASM-compatible; this may or may not be a deal-breaker depending on your app's requirements, as not all crates in the Rust ecosystem have WASM support.
+
+If you're willing to live with the limitations of WASM server-side, the best place to get started right now is by checking out the [example of running Leptos with Deno](https://github.com/leptos-rs/leptos/tree/main/examples/hackernews_js_fetch) in the official Leptos Github repo.
+
+
+## Platforms Working on Leptos Support
+
+### Deploy to Spin Serverless WASI (with Leptos SSR)
+
+WebAssembly on the server has been gaining steam lately, and the developers of the open source serverless WebAssembly framework Spin are working on natively supporting Leptos. While the Leptos-Spin SSR integration is still in its early stages, there is a working example you may wish to try out.
+
+The full set of instructions to get Leptos SSR & Spin working together are available as [a post on the Fermyon blog](
+https://www.fermyon.com/blog/leptos-spin-get-started), or if you want to skip the article and just start playing around with a working starter repo, [see here](https://github.com/diversable/leptos-spin-ssr-test).
+
+
+
+### Deploy to Shuttle.rs
+
+Several Leptos users have asked about the possibility of using the Rust-friendly [Shuttle.rs](https://www.shuttle.rs/) service to deploy Leptos apps. Unfortunately, Leptos is not officially supported by the Shuttle.rs service at the moment.
+
+However, the folks at Shuttle.rs are committed to getting Leptos support in the future; if you would like to keep up-to-date on the status of that work, keep an eye on [this Github issue](https://github.com/shuttle-hq/shuttle/issues/1002#issuecomment-1853661643).
+
+Additionally, some effort has been made to get Shuttle working with Leptos, but to date, deploys to the Shuttle cloud are still not working as expected. That work is available here, if you would like to investigate for yourself or contribute fixes: [Leptos Axum Starter Template for Shuttle.rs](https://github.com/Rust-WASI-WASM/shuttle-leptos-axum).
\ No newline at end of file
diff --git a/src/deployment/tauri.md b/src/deployment/tauri.md
new file mode 100644
index 0000000..e69de29