docs: remove docs and move to book

This commit is contained in:
Ben Allfree 2023-06-10 04:41:02 -07:00
parent ea3cb58cd0
commit bdaf15f7e4
20 changed files with 18 additions and 197 deletions

View File

@ -5,13 +5,15 @@
## Daily Usage
- [Getting Help](usage/help.md)
- [FAQ](usage/faq.md)
- [Creating an Instance](usage/create.md)
- [Instance Details](usage/instance-details/index.md)
- [FTP Access](usage/ftp.md)
- [Backup & Restore](usage/backup-and-restore.md)
- [Cloud Functions](usage/cloud.md)
- [Upgrading](usage/upgrading.md)
## Development
## Contributing
- [Overview](development/overview.md)
- [Roadmap](development/roadmap.md)

View File

@ -5,3 +5,9 @@ You can use [FTP](ftp.md) to perform backup and restore operations.
## Before you Begin
Make sure your PocketHost instance status is [idle](instance-details/index.md).
## Backing Up
## Restoring
## Synchronizing

View File

@ -1,13 +1,8 @@
---
title: Cloud Functions
published: false
---
# Cloud Functions
PocketHost can run a Deno worker alongside your instance. In this worker, you can use the PocketHost client to listen for realtime changes or perform any other operations you desire.
Update your Deno worker via [PocketHost's FTP service](ftp).
Update your Deno worker via [PocketHost's FTP service](ftp.md).
## Quickstart

View File

@ -1,8 +1,3 @@
---
title: FAQ
published: false
---
# Frequently Asked Questions
## About

View File

@ -1,21 +0,0 @@
# Instance Details
## Status
The instance status indicates whether the instance is currently running. Values might include `idle`, `starting`, and `running`.
![Status](status.png)
## Usage
## Version
## Admin URL
## FTP access
## Code samples
## Secrets
## Logs

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -1,8 +1,3 @@
---
title: Managing Your Instance
published: true
---
# Managing your Instance
PocketHost provides a simple dashboard where you can manage your instance.
@ -13,9 +8,9 @@ PocketHost runs your PocketBase instance on-demand. That means PocketHost waits
Instances are placed in hibernation after 5 seconds of idle time.
![](/images/docs/2023-01-05-22-22-47.png)
![](2023-01-05-22-22-47.png)
![](/images/docs/2023-01-05-22-21-17.png)
![](2023-01-05-22-21-17.png)
> Note: There is a slight "first hit" penalty if PocketHost needs to spin up your idle instance before responding to a request. In practice, this is not noticeable to most users for most applications. It's nearly indistinguishable from normal network delays.
@ -23,15 +18,15 @@ Instances are placed in hibernation after 5 seconds of idle time.
The free tier of PocketHost provides 100 _active minutes_ per month.
![](/images/docs/2023-01-05-23-02-49.png)
![](2023-01-05-23-02-49.png)
Because an instance stays active for a minimum of only 5 seconds per activation, 100 minutes of real, active usage is actually quite a bit. After you use your 100 minutes, you can either pay for more usage minutes, or PocketHost will move your instance to the pool of stand-by instances that get served after everyone else. Again, in practice, you will likely not even notice the difference. But if you do, there is always a paid option.
> Because an instance stays active for a minimum of only 5 seconds per activation, 100 minutes of real, active usage is actually quite a bit. After you use your 100 minutes, you can either pay for more usage minutes, or PocketHost will move your instance to the pool of stand-by instances that get served after everyone else. Again, in practice, you will likely not even notice the difference. But if you do, there is always a paid option.
## Instance Versioning
By default, your instance will use the latest major+minor release of PocketBase. The PocketBase version is locked when your instance is created. We use [semver](https://semver.org/) ([npm package](https://docs.npmjs.com/cli/v6/using-npm/semver)) to determine the version range that should be allowed for your instance. When your instance is launched, it will use the latest matching version.
![](/images/docs/2023-01-05-22-03-18.png)
![](2023-01-05-22-03-18.png)
For example, if the latest version of PocketBase is `0.10.4`, your instance will automatically run with `~0.10.4`, meaning that `major=0` and `minor=10` are locked, but `patch=4 or higher` will be applied.
@ -49,12 +44,10 @@ The PocketHost dashboard also provides a handy link to do this.
## Secrets
Instance secrets are defined as environment variables when a [PocketHost Cloud Function Deno worker](worker) is launched. Every secret you specify here will be made available as an environment variable to the Deno process:
Instance secrets are defined as environment variables when a [PocketHost Cloud Function Deno worker](../cloud.md) is launched. Every secret you specify here will be made available as an environment variable to the Deno process:
```ts
const MY_SECRET = Deno.env.get('MY_SECRET') || ''
```
## Realtime log
## Backups and restores

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -82,7 +82,7 @@
<li class="nav-item text-center">
<a
href="/faq"
href="https://pockethost.gitbook.io/manual/daily-usage/faq"
class="nav-link btn btn-outline-dark rounded-1 d-inline-block px-3"
rel="noreferrer">FAQ</a
>
@ -99,7 +99,7 @@
<li class="nav-item text-center">
<a
href="/docs"
href="https://pockethost.gitbook.io/manual/"
class="nav-link btn btn-outline-dark rounded-1 d-inline-block px-3"
rel="noreferrer">Docs</a
>

View File

@ -1,35 +0,0 @@
---
title: FTP Access to Instances
published: false
---
# FTP Access to Instances
PocketHost allows you to access your instance data, Deno workers, and static assets via FTP.
## Accessing FTP
## `pb_data` directory
`pb_data` contains all the standard PocketBase data files. `instance_logs.db`
## `pb_public` directory
## `worker` directory
```bash
ftp <instance-name>.pockethost.io
```
```ts
import cloud_functions from './cloud_functions.md'
import ftp from './ftp.md'
import introduction from './introduction.md'
export type PageName = keyof typeof pages
export const pages = { introduction, cloud_functions, ftp }
console.log(pages)
```
Log in using your PocketHost username and password.

View File

@ -1,10 +0,0 @@
import cloud_functions from './cloud_functions.md'
import faq from './faq.md'
import ftp from './ftp.md'
import instances from './instances.md'
import introduction from './introduction.md'
console.log(JSON.stringify(faq, null, 2))
export type PageName = keyof typeof pages
export const pages = { introduction, instances, cloud_functions, ftp, faq }
export { faq, ftp, instances, introduction }

View File

@ -1,10 +0,0 @@
---
title: Introduction
published: true
---
# PocketHost Docs
Welcome to PocketHost!
PocketHost is the zero-config, up-in-30-seconds hosting platform for PocketBase. If you're looking for a developer and production experience more like Firebase and Supabase, you've come to the right place.

View File

@ -1,48 +0,0 @@
<script lang="ts">
import { PUBLIC_DEBUG } from '$src/env'
import { pages } from '../../docs'
</script>
<div class="docs">
<div class="container">
<div class="toc">
{#each Object.entries(pages).filter(([k, p]) => p.attributes.published || PUBLIC_DEBUG) as [v, k], i}
<div>
<a class={`nav-link ${k.attributes.published ? '' : 'text-danger'}`} href={`/docs/${v}`}
>{k.attributes.title}</a
>
</div>
{/each}
</div>
<div class="body">
<slot />
</div>
</div>
</div>
<style lang="scss">
.title {
border-bottom: 1px solid gray;
}
.container {
margin-left: initial;
padding: 10px;
white-space: nowrap;
.toc {
white-space: normal;
width: 200px;
border-right: 1px solid gray;
float: left;
margin-right: 20px;
min-height: 1000px;
div {
font-weight: bold;
}
}
.body {
white-space: normal;
float: left;
width: calc(100% - 300px);
}
}
</style>

View File

@ -1,9 +0,0 @@
<script lang="ts">
import { page } from '$app/stores'
import { pages } from '../../docs'
const { pageName } = $page.params
const md = pages.introduction
</script>
{@html md.body}

View File

@ -1,23 +0,0 @@
<script lang="ts">
import { browser } from '$app/environment'
import { page } from '$app/stores'
import { pages, type PageName } from '$src/docs'
import hljs from 'highlight.js'
import { tick } from 'svelte'
let md: DocPage
$: {
const { pageName } = $page.params
md = pages[pageName as PageName]
tick().then(() => {
if (browser) {
hljs.highlightAll()
}
})
}
</script>
{#if !md.attributes.published}
<div class="text-danger">Draft</div>
{/if}
{@html md.body}

View File

@ -1,14 +0,0 @@
<script lang="ts">
import FrequentlyAskedQuestions from '$components/FrequentlyAskedQuestions.svelte'
</script>
<div class="container">
<h2 class="mb-5">Frequently asked questions</h2>
<FrequentlyAskedQuestions />
</div>
<style>
.container {
margin: 50px auto;
}
</style>