set TOES_URL
This commit is contained in:
parent
74d7d2f578
commit
c183fe42e9
|
|
@ -2,6 +2,7 @@ import type { App as SharedApp, AppState } from '@types'
|
|||
import type { Subprocess } from 'bun'
|
||||
import { DEFAULT_EMOJI } from '@types'
|
||||
import { appendFileSync, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, symlinkSync, unlinkSync, writeFileSync } from 'fs'
|
||||
import { hostname } from 'os'
|
||||
import { join, resolve } from 'path'
|
||||
import { loadAppEnv } from '../tools/env'
|
||||
import { appLog, hostLog, setApps } from './tui'
|
||||
|
|
@ -10,7 +11,9 @@ export type { AppState } from '@types'
|
|||
|
||||
export const APPS_DIR = process.env.APPS_DIR ?? resolve(join(process.env.DATA_DIR ?? '.', 'apps'))
|
||||
export const TOES_DIR = process.env.TOES_DIR ?? join(process.env.DATA_DIR ?? '.', 'toes')
|
||||
export const TOES_URL = process.env.TOES_URL ?? `http://localhost:${process.env.PORT || 3000}`
|
||||
|
||||
const defaultHost = process.env.NODE_ENV === 'production' ? `${hostname()}.local` : 'localhost'
|
||||
export const TOES_URL = process.env.TOES_URL ?? `http://${defaultHost}:${process.env.PORT || 3000}`
|
||||
|
||||
const HEALTH_CHECK_FAILURES_BEFORE_RESTART = 3
|
||||
const HEALTH_CHECK_INTERVAL = 30000
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user