mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-04 03:42:29 +00:00
fix: select unused port for mothership
This commit is contained in:
parent
e042afbe32
commit
d7fe9cd38f
@ -7,7 +7,6 @@ import {
|
||||
MOTHERSHIP_HOOKS_DIR,
|
||||
MOTHERSHIP_MIGRATIONS_DIR,
|
||||
MOTHERSHIP_NAME,
|
||||
MOTHERSHIP_PORT,
|
||||
MOTHERSHIP_SEMVER,
|
||||
PH_BIN_CACHE,
|
||||
SETTINGS,
|
||||
@ -62,6 +61,7 @@ global.EventSource = EventSource
|
||||
*/
|
||||
|
||||
info(`Serving`)
|
||||
const [port] = await PortService().alloc()
|
||||
const url = await new Promise<string>((resolve) => {
|
||||
const mothership = async () => {
|
||||
try {
|
||||
@ -70,7 +70,7 @@ global.EventSource = EventSource
|
||||
version: MOTHERSHIP_SEMVER(),
|
||||
name: MOTHERSHIP_NAME(),
|
||||
slug: MOTHERSHIP_NAME(),
|
||||
port: MOTHERSHIP_PORT(),
|
||||
port,
|
||||
env: {
|
||||
DATA_ROOT: `/home/pocketbase/data`,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user