mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-10 14:52:32 +00:00
Merge branch 'master' of github.com:benallfree/pockethost
This commit is contained in:
commit
5354e55d0a
38
cspell.json
38
cspell.json
@ -26,6 +26,42 @@
|
|||||||
"tailable",
|
"tailable",
|
||||||
"Unsub",
|
"Unsub",
|
||||||
"unzipper",
|
"unzipper",
|
||||||
"upserting"
|
"upserting",
|
||||||
|
"authstore",
|
||||||
|
"autocancel",
|
||||||
|
"automigrate",
|
||||||
|
"Certbot",
|
||||||
|
"czvf",
|
||||||
|
"Darkmode",
|
||||||
|
"Dockerized",
|
||||||
|
"dockerode",
|
||||||
|
"esbuild",
|
||||||
|
"frontends",
|
||||||
|
"fullchain",
|
||||||
|
"IPCIDR",
|
||||||
|
"Jsonifiable",
|
||||||
|
"memorystream",
|
||||||
|
"Middlware",
|
||||||
|
"mothership",
|
||||||
|
"multitenancy",
|
||||||
|
"multitenant",
|
||||||
|
"nofile",
|
||||||
|
"nohup",
|
||||||
|
"PASV",
|
||||||
|
"pbincache",
|
||||||
|
"pexec",
|
||||||
|
"pocketbase",
|
||||||
|
"pockethost",
|
||||||
|
"POCKETSTREAM",
|
||||||
|
"privkey",
|
||||||
|
"Rpcs",
|
||||||
|
"TRYFETCH",
|
||||||
|
"Ulimits",
|
||||||
|
"unsub",
|
||||||
|
"Unsubbing",
|
||||||
|
"Unsubscriber",
|
||||||
|
"Unwatching",
|
||||||
|
"unzipper",
|
||||||
|
"Virtio"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -262,6 +262,7 @@ export const createPocketbaseClient = (config: PocketbaseClientConfig) => {
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Authorization: client.authStore.token,
|
Authorization: client.authStore.token,
|
||||||
},
|
},
|
||||||
|
openWhenHidden: true,
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
instanceId: instance.id,
|
instanceId: instance.id,
|
||||||
n: nInitial,
|
n: nInitial,
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
import FAQSection from '$src/routes/account/FAQSection.svelte'
|
import FAQSection from '$src/routes/account/FAQSection.svelte'
|
||||||
import PricingCard from '$src/routes/account/PricingCard.svelte'
|
import PricingCard from '$src/routes/account/PricingCard.svelte'
|
||||||
import {
|
import {
|
||||||
|
isUserFounder,
|
||||||
isUserLegacy,
|
isUserLegacy,
|
||||||
userStore,
|
userStore,
|
||||||
userSubscriptionType,
|
userSubscriptionType,
|
||||||
isUserFounder,
|
|
||||||
} from '$util/stores'
|
} from '$util/stores'
|
||||||
import { onMount } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
import { writable } from 'svelte/store'
|
import { writable } from 'svelte/store'
|
||||||
@ -21,7 +21,7 @@
|
|||||||
const membershipCount = await client()
|
const membershipCount = await client()
|
||||||
.client.collection('settings')
|
.client.collection('settings')
|
||||||
.getFirstListItem(`name = 'founders-edition-count'`)
|
.getFirstListItem(`name = 'founders-edition-count'`)
|
||||||
founderMembershipsRemaining.set(membershipCount.value)
|
founderMembershipsRemaining.set(Math.max(0, membershipCount.value))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@
|
|||||||
<PricingCard
|
<PricingCard
|
||||||
name={`${PLAN_NAMES[SubscriptionType.Lifetime]}`}
|
name={`${PLAN_NAMES[SubscriptionType.Lifetime]}`}
|
||||||
qtyRemaining={founderMembershipsRemaining}
|
qtyRemaining={founderMembershipsRemaining}
|
||||||
qtyMax={200}
|
qtyMax={100}
|
||||||
description="Super elite! The Founder's Edition is our way of saying thanks for supporting PocketHost in these early days. Choose between lifetime and annual options."
|
description="Super elite! The Founder's Edition is our way of saying thanks for supporting PocketHost in these early days. Choose between lifetime and annual options."
|
||||||
priceMonthly={[299, 'once, use forever']}
|
priceMonthly={[299, 'once, use forever']}
|
||||||
priceAnnually={[99, 'year (save 55%)']}
|
priceAnnually={[99, 'year (save 55%)']}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { StreamNames, Unsubscribe, type InstanceLogFields } from '$shared'
|
import { StreamNames, Unsubscribe, type InstanceLogFields } from '$shared'
|
||||||
import { client } from '$src/pocketbase-client'
|
import { client } from '$src/pocketbase-client'
|
||||||
import { mkCleanup } from '$util/componentCleanup'
|
import { mkCleanup } from '$util/componentCleanup'
|
||||||
import { onMount } from 'svelte'
|
import { onMount, tick } from 'svelte'
|
||||||
import { derived, writable } from 'svelte/store'
|
import { derived, writable } from 'svelte/store'
|
||||||
import { instance } from '../store'
|
import { instance } from '../store'
|
||||||
|
|
||||||
@ -33,6 +33,29 @@
|
|||||||
modal?.showModal()
|
modal?.showModal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Auto Scrolls The Logs Window as New Logs Are Appended
|
||||||
|
// -----------------------------------------------------
|
||||||
|
|
||||||
|
let logElement: Element
|
||||||
|
let logElementPopup: Element
|
||||||
|
|
||||||
|
let autoScroll: boolean = true
|
||||||
|
|
||||||
|
const scrollToBottom = (node: Element) => {
|
||||||
|
if (node) {
|
||||||
|
node.scroll({ top: node.scrollHeight, behavior: 'smooth' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$: if ($logs && autoScroll) {
|
||||||
|
tick().then(() => {
|
||||||
|
if (logElement) scrollToBottom(logElement)
|
||||||
|
if (logElementPopup) scrollToBottom(logElementPopup)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------
|
||||||
|
|
||||||
const logs = writable<InstanceLogFields[]>([])
|
const logs = writable<InstanceLogFields[]>([])
|
||||||
|
|
||||||
const onDestroy = mkCleanup()
|
const onDestroy = mkCleanup()
|
||||||
@ -62,9 +85,22 @@
|
|||||||
|
|
||||||
<dialog id="loggingFullscreenModal" class="modal backdrop-blur">
|
<dialog id="loggingFullscreenModal" class="modal backdrop-blur">
|
||||||
<div class="modal-box max-w-[90vw] h-[90vh]">
|
<div class="modal-box max-w-[90vw] h-[90vh]">
|
||||||
|
<button
|
||||||
|
class="btn btn-sm absolute top-[6px] right-[6px]"
|
||||||
|
on:click={() => (autoScroll = !autoScroll)}
|
||||||
|
>AutoScroll
|
||||||
|
<i
|
||||||
|
class="fa-regular"
|
||||||
|
class:fa-close={!autoScroll}
|
||||||
|
class:fa-arrow-down={autoScroll}
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
<h3 class="font-bold text-lg">Instance Logging</h3>
|
<h3 class="font-bold text-lg">Instance Logging</h3>
|
||||||
|
|
||||||
<div class="py-4 h-[80vh] overflow-y-scroll flex flex-col">
|
<div
|
||||||
|
class="py-4 h-[80vh] overflow-y-scroll flex flex-col"
|
||||||
|
bind:this={logElementPopup}
|
||||||
|
>
|
||||||
{#each $logs as log}
|
{#each $logs as log}
|
||||||
<div
|
<div
|
||||||
class="px-4 text-[11px] font-mono flex align-center"
|
class="px-4 text-[11px] font-mono flex align-center"
|
||||||
@ -87,12 +123,20 @@
|
|||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
<div class="mockup-code">
|
<div class="mockup-code">
|
||||||
<button
|
<div class="flex flex-row absolute top-[6px] right-[6px] gap-1">
|
||||||
class="btn btn-sm absolute top-[6px] right-[6px]"
|
<button class="btn btn-sm" on:click={() => (autoScroll = !autoScroll)}
|
||||||
on:click={handleFullScreenModal}
|
>AutoScroll
|
||||||
>Fullscreen <i class="fa-regular fa-arrows-maximize"></i></button
|
<i
|
||||||
|
class="fa-regular"
|
||||||
|
class:fa-close={!autoScroll}
|
||||||
|
class:fa-arrow-down={autoScroll}
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-sm" on:click={handleFullScreenModal}
|
||||||
|
>Fullscreen <i class="fa-regular fa-arrows-maximize" /></button
|
||||||
>
|
>
|
||||||
<div class="h-[450px] flex flex-col overflow-y-scroll">
|
</div>
|
||||||
|
<div class="h-[450px] flex flex-col overflow-y-scroll" bind:this={logElement}>
|
||||||
{#each $logs as log}
|
{#each $logs as log}
|
||||||
<div class="px-4 text-[11px] font-mono flex align-center" data-prefix=">">
|
<div class="px-4 text-[11px] font-mono flex align-center" data-prefix=">">
|
||||||
<div>
|
<div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
PocketHost is the open source the cloud hosting platform for PocketBase. https://pockethost.io is the flagship service running PocketHost, where you can host your PocketBase projects wit zero setup. Create a project like you would in Firebase and Supabase and let PocketHost do the rest.
|
PocketHost is the open source cloud hosting platform for PocketBase. https://pockethost.io is the flagship service running PocketHost, where you can host your PocketBase projects with zero setup. Create a project like you would in Firebase and Supabase and let PocketHost do the rest.
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
|
@ -20,8 +20,6 @@ const { dbg, info, error } = LoggerService({
|
|||||||
level: DEBUG() ? LogLevelName.Debug : LogLevelName.Info,
|
level: DEBUG() ? LogLevelName.Debug : LogLevelName.Info,
|
||||||
}).create(`edge-syslogd`)
|
}).create(`edge-syslogd`)
|
||||||
|
|
||||||
console.log(`debug is ${DEBUG()}`)
|
|
||||||
|
|
||||||
server.on('error', (err) => {
|
server.on('error', (err) => {
|
||||||
console.log(`Server error:\n${err.stack}`)
|
console.log(`Server error:\n${err.stack}`)
|
||||||
server.close()
|
server.close()
|
||||||
|
@ -109,9 +109,13 @@ export const createPocketbaseService = async (
|
|||||||
const docker = new Docker()
|
const docker = new Docker()
|
||||||
iLogger.info(`Starting instance`)
|
iLogger.info(`Starting instance`)
|
||||||
|
|
||||||
const _stdoutData = (data: Buffer) => {}
|
const _stdoutData = (data: Buffer) => {
|
||||||
|
dbg(data.toString())
|
||||||
|
}
|
||||||
stdout.on('data', _stdoutData)
|
stdout.on('data', _stdoutData)
|
||||||
const _stdErrData = (data: Buffer) => {}
|
const _stdErrData = (data: Buffer) => {
|
||||||
|
dbg(data.toString())
|
||||||
|
}
|
||||||
stderr.on('data', _stdErrData)
|
stderr.on('data', _stdErrData)
|
||||||
const Binds = [
|
const Binds = [
|
||||||
`${mkInstanceDataPath(instanceId)}:${mkContainerHomePath()}`,
|
`${mkInstanceDataPath(instanceId)}:${mkContainerHomePath()}`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user