docs: book

This commit is contained in:
Ben Allfree 2023-06-10 04:23:01 -07:00
parent 84b0a7de04
commit ea3cb58cd0
13 changed files with 104 additions and 10 deletions

View File

@ -2,12 +2,21 @@
- [👋 Welcome to PocketHost](README.md)
## Daily Usage
- [Getting Help](usage/help.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)
- [Upgrading](usage/upgrading.md)
## Development
- [Overview](development/overview.md)
- [Roadmap](development/roadmap.md)
- [Running Just the Frontend](development/frontend.md)
- [Running Everything](development/full-stack/readme.md)
- [Running Everything](development/full-stack/index.md)
- [Production Deployment](development/production.md)
## Release History

View File

@ -12,3 +12,4 @@
- Fix: FTP now accesses `pb_migrations`
- Fix: Secrets CSS light/dark mode fixes
- Chore: remove `platform` field from instances and backups
- Docs: converted to GitBook

View File

@ -0,0 +1,7 @@
# Backup & Restore
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).

7
gitbook/usage/create.md Normal file
View File

@ -0,0 +1,7 @@
# Creating an Instance
Every PocketHost instance runs on a unique subdomain. To create a new instance, head to [https://pockethost.io/app/new](https://pockethost.io/app/new).
You'll need to choose a unique name.
That's literally all you need to do! Voila, a new PocketBase instance will now be available.

30
gitbook/usage/ftp.md Normal file
View File

@ -0,0 +1,30 @@
# FTP Access
PocketHost allows you to access all your PocketBase files via Secure FTP (FTPS).
## Accessing via FTP
FTP to [ftp://pockethost.io](ftp://pockethost.io) and log in using your pockethost.io username and password.
The initial directory listing contains a directory for each instance associated with your account.
Inside each instance directory, you will find:
| Directory Name | Description |
| -------------- | ----------------------------------------------------------------------------- |
| pb_data | The PocketBase data directory |
| pb_static | The location from which static files are served |
| pb_migrations | The PocketBase [migrations](https://pocketbase.io/docs/migrations/) directory |
| worker | The Deno-based cloud worker |
## Recommended Clients
### GUI
- [FileZilla](https://filezilla-project.org/) is a great GUI frontend available for all platforms.
### CLI
- [ftp](https://ftp.gnu.org/)
- [wget](https://www.gnu.org/software/wget/) [[homebrew](https://formulae.brew.sh/formula/wget)]
- [lftp](https://lftp.yar.ru/) [[homebrew](https://formulae.brew.sh/formula/lftp)]

9
gitbook/usage/help.md Normal file
View File

@ -0,0 +1,9 @@
# Getting Help
## Discussion Forum
The fastest and easiest way to get help is to head over to the [PocketHost Discussions](https://github.com/benallfree/pockethost/discussions) forum. Please do not create github issues without initiating a discussion first.
## Email
If you need to have a private conversation, contact ben@pockethost.io.

View File

@ -0,0 +1,21 @@
# 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -0,0 +1,7 @@
# Upgrading your Instance Version
PocketHost supports all versions of PocketBase.
Your instance uses [semver](https://semver.org/) to describe which version of PocketBase to run (eg, `~0.16.0`).
If you need to change the semver, please contact us.

View File

@ -2,17 +2,19 @@
import CopyButton from '$components/CopyButton.svelte'
import { dbg } from '$util/logger'
import { Highlight } from 'svelte-highlight'
import { typescript } from 'svelte-highlight/languages'
import { typescript, type LanguageType } from 'svelte-highlight/languages'
import 'svelte-highlight/styles/github.css'
export let code: string
export let language: LanguageType<'typescript' | 'bash'> = typescript
const handleCopy = () => {
dbg('copied')
}
</script>
<div class="copy-container">
<Highlight language={typescript} {code} />
<Highlight {language} {code} />
<div class="copy-button">
<CopyButton {code} copy={handleCopy} />

View File

@ -2,12 +2,10 @@
import { PUBLIC_APP_DOMAIN } from '$env/static/public'
import { PUBLIC_APP_PROTOCOL } from '$src/env'
import { assertExists } from '@pockethost/common'
import Backup from './Backup.svelte'
import Code from './Code.svelte'
import Ftp from './Ftpx.svelte'
import Logging from './Logging.svelte'
import Overview from './Overview.svelte'
import Restore from './Restore.svelte'
import Secrets from './Secrets/Secrets.svelte'
import { instance } from './store'
@ -26,6 +24,4 @@
<Code instance={$instance} />
<Secrets instance={$instance} />
<Logging instance={$instance} />
<Backup instance={$instance} />
<Restore instance={$instance} />
{/if}

View File

@ -1,7 +1,9 @@
<script lang="ts">
import CodeSample from '$components/CodeSample.svelte'
import { PUBLIC_APP_DOMAIN } from '$src/env'
import { client } from '$src/pocketbase'
import type { InstanceFields } from '@pockethost/common'
import { bash } from 'svelte-highlight/languages'
export let instance: InstanceFields
@ -17,8 +19,11 @@
<div class="py-4">
<h2>FTP Access</h2>
<div>
Securely access your instance files via <a href={ftpUrl}>{ftpUrl}</a>. Use your PocketHost
account login and password.
Securely access your instance files via <code><a href={ftpUrl}>{ftpUrl}</a></code>. Use your
PocketHost account login and password.
<p>Recommended FTP client: <a href="https://filezilla-project.org/">FileZilla</a></p>
<p>Bash:</p>
<CodeSample code={`ftp ${ftpUrl}`} language={bash} />
<table>
<thead><tr><th>Directory</th><th>Description</th></tr></thead>
<tr>
@ -28,7 +33,7 @@
<th>pb_static</th><td>Static files, such as a web frontend</td>
</tr>
<tr>
<th>backups</th><td>Location of tgz backups made using this UI</td>
<th>pb_migrations</th><td>The PocketBase migrations directory</td>
</tr>
<tr>
<th>worker</th><td>Deno worker (cloud TS/JS functions)</td>