mirror of
https://github.com/pockethost/pockethost.git
synced 2025-03-30 15:08:30 +00:00
Remove run.sh
This commit is contained in:
parent
a1c5239607
commit
ad2ddfc04e
@ -1,4 +1,4 @@
|
||||
import { APEX_DOMAIN, PH_PROJECT_ROOT, mkInstanceDataPath } from '$constants'
|
||||
import { APEX_DOMAIN, mkInstanceDataPath } from '$constants'
|
||||
import { InstanceLogger, PortService } from '$services'
|
||||
import {
|
||||
LoggerService,
|
||||
@ -12,7 +12,6 @@ import { map } from '@s-libs/micro-dash'
|
||||
import Docker, { Container, ContainerCreateOptions } from 'dockerode'
|
||||
import { existsSync } from 'fs'
|
||||
import MemoryStream from 'memorystream'
|
||||
import { join } from 'path'
|
||||
import { AsyncReturnType } from 'type-fest'
|
||||
import { PocketbaseReleaseVersionService } from '../PocketbaseReleaseVersionService'
|
||||
import { buildImage } from './buildImage'
|
||||
@ -108,25 +107,22 @@ export const createPocketbaseService = async (
|
||||
})
|
||||
}
|
||||
stderr.on('data', _stdErrData)
|
||||
const Binds = [`${mkInstanceDataPath(slug)}:/home/pocketbase`]
|
||||
Binds.push(`${binPath}:/home/pocketbase/pocketbase:ro`)
|
||||
Binds.push(
|
||||
`${join(
|
||||
PH_PROJECT_ROOT(),
|
||||
'src',
|
||||
'services',
|
||||
'PocketBaseService',
|
||||
`run.sh`,
|
||||
)}:/home/pocketbase/run.sh:ro`,
|
||||
)
|
||||
const Binds = [
|
||||
`${mkInstanceDataPath(slug)}:/home/pocketbase`,
|
||||
`${binPath}:/home/pocketbase/pocketbase:ro`,
|
||||
]
|
||||
|
||||
if (extraBinds.length > 0) {
|
||||
Binds.push(...extraBinds)
|
||||
}
|
||||
|
||||
const Cmd = (() => {
|
||||
return [`./pocketbase`, `serve`, `--http`, `0.0.0.0:8090`]
|
||||
})()
|
||||
|
||||
const createOptions: ContainerCreateOptions = {
|
||||
Image: INSTANCE_IMAGE_NAME,
|
||||
Cmd: [`/bin/bash`, `./run.sh`],
|
||||
Cmd,
|
||||
Env: map(
|
||||
{
|
||||
...env,
|
||||
|
@ -1,19 +0,0 @@
|
||||
#!/bim/bash
|
||||
|
||||
./pocketbase serve --http 0.0.0.0:8090 &
|
||||
pid1=$!
|
||||
|
||||
# Start the second process in the background
|
||||
# process2 &
|
||||
# pid2=$!
|
||||
|
||||
# Wait for either process to exit
|
||||
wait -n
|
||||
exit_status=$?
|
||||
|
||||
# Kill the remaining process (if any)
|
||||
kill $pid1 2>/dev/null
|
||||
kill $pid2 2>/dev/null
|
||||
|
||||
# Exit with the captured exit status
|
||||
exit $exit_status
|
Loading…
x
Reference in New Issue
Block a user