docs(tanstack): update README with deployment instructions for Dokploy example
This commit is contained in:
@@ -22,5 +22,6 @@ This repository contains examples of how to deploy applications using Dokploy.
|
|||||||
- [x] T3 App
|
- [x] T3 App
|
||||||
- [x] Turborepo
|
- [x] Turborepo
|
||||||
- [x] HTML
|
- [x] HTML
|
||||||
|
- [x] Tanstack
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,72 +1,22 @@
|
|||||||
# Welcome to TanStack.com!
|
# Tanstack Example
|
||||||
|
|
||||||
This site is built with TanStack Router!
|
This repository contains an example of Tanstack application that is deployed on Dokploy.
|
||||||
|
|
||||||
- [TanStack Router Docs](https://tanstack.com/router)
|
|
||||||
|
|
||||||
It's deployed automagically with Netlify!
|
1. **Use Git Provider in Your Application**:
|
||||||
|
- Repository: `https://github.com/Dokploy/examples.git`
|
||||||
|
- Branch: `main`
|
||||||
|
- Build path: `/tanstack`
|
||||||
|
- use `Nixpacks` as builder
|
||||||
|
|
||||||
- [Netlify](https://netlify.com/)
|
3. **Click on Deploy**:
|
||||||
|
- Deploy your application by clicking the deploy button.
|
||||||
|
|
||||||
## Development
|
4. **Generate a Domain**:
|
||||||
|
- Click on generate domain button.
|
||||||
|
- A new domain will be generated for you.
|
||||||
|
- Set Port `3000`
|
||||||
|
- You can use this domain to access your application.
|
||||||
|
|
||||||
From your terminal:
|
|
||||||
|
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||||
```sh
|
|
||||||
pnpm install
|
|
||||||
pnpm dev
|
|
||||||
```
|
|
||||||
|
|
||||||
This starts your app in development mode, rebuilding assets on file changes.
|
|
||||||
|
|
||||||
## Editing and previewing the docs of TanStack projects locally
|
|
||||||
|
|
||||||
The documentations for all TanStack projects except for `React Charts` are hosted on [https://tanstack.com](https://tanstack.com), powered by this TanStack Router app.
|
|
||||||
In production, the markdown doc pages are fetched from the GitHub repos of the projects, but in development they are read from the local file system.
|
|
||||||
|
|
||||||
Follow these steps if you want to edit the doc pages of a project (in these steps we'll assume it's [`TanStack/form`](https://github.com/tanstack/form)) and preview them locally :
|
|
||||||
|
|
||||||
1. Create a new directory called `tanstack`.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
mkdir tanstack
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Enter the directory and clone this repo and the repo of the project there.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd tanstack
|
|
||||||
git clone git@github.com:TanStack/tanstack.com.git
|
|
||||||
git clone git@github.com:TanStack/form.git
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> Your `tanstack` directory should look like this:
|
|
||||||
>
|
|
||||||
> ```
|
|
||||||
> tanstack/
|
|
||||||
> |
|
|
||||||
> +-- form/
|
|
||||||
> |
|
|
||||||
> +-- tanstack.com/
|
|
||||||
> ```
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> Make sure the name of the directory in your local file system matches the name of the project's repo. For example, `tanstack/form` must be cloned into `form` (this is the default) instead of `some-other-name`, because that way, the doc pages won't be found.
|
|
||||||
|
|
||||||
3. Enter the `tanstack/tanstack.com` directory, install the dependencies and run the app in dev mode:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd tanstack.com
|
|
||||||
pnpm i
|
|
||||||
# The app will run on https://localhost:3000 by default
|
|
||||||
pnpm dev
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Now you can visit http://localhost:3000/form/latest/docs/overview in the browser and see the changes you make in `tanstack/form/docs`.
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> The updated pages need to be manually reloaded in the browser.
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> You will need to update the `docs/config.json` file (in the project's repo) if you add a new doc page!
|
|
||||||
|
|||||||
Reference in New Issue
Block a user