This commit is contained in:
Chris Wanstrath 2025-09-24 09:33:46 -07:00
parent 0b6ff7f854
commit 61d917ba7f
3 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import { $ } from "bun" import { $ } from "bun"
import { apps } from "app/src/webapp" import { apps } from "app/src/webapp"
const devMode = process.env.BUN_HOT const devMode = process.env.NODE_ENV !== "production"
export default async function () { export default async function () {
const { stdout: hostname } = await $`hostname`.quiet() const { stdout: hostname } = await $`hostname`.quiet()

View File

@ -5,6 +5,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"start": "bun src/server.tsx", "start": "bun src/server.tsx",
"prod": "env NODE_ENV=production bun src/server.tsx",
"dev": "env BUN_HOT=1 bun --hot src/server.tsx", "dev": "env BUN_HOT=1 bun --hot src/server.tsx",
"deploy": "./scripts/deploy.sh", "deploy": "./scripts/deploy.sh",
"push": "./scripts/deploy.sh", "push": "./scripts/deploy.sh",

View File

@ -111,7 +111,7 @@ export async function publishDNS() {
} }
function publishAppDNS(app: string) { function publishAppDNS(app: string) {
if (process.env.BUN_HOT) return if (process.env.NODE_ENV !== "production") return
if (!dnsEntries[app]) if (!dnsEntries[app])
dnsEntries[app] = Bun.spawn(["avahi-publish", "-a", `${app}.${host}.local`, "-R", ip]) dnsEntries[app] = Bun.spawn(["avahi-publish", "-a", `${app}.${host}.local`, "-R", ip])