This commit is contained in:
2025-11-29 18:01:15 -05:00
parent dbb9fbd7b0
commit da07ee2f40

View File

@@ -1,10 +1,10 @@
import { Elysia } from "elysia";
import { Elysia, env } from "elysia";
import hash from "object-hash";
import { indexedConfig } from "./config";
import { deploy } from "./deploy";
import { PushEvent } from "./giteaTypes";
const port = process.env.PORT ?? 6001;
const port = env.PORT ?? 6001;
new Elysia()
.onError(({ error }) => console.error(error))
@@ -37,6 +37,9 @@ new Elysia()
void deploy({ host: service.host, commitHash });
return "deploying";
})
.listen(port);
.listen({
port,
hostname: env.NODE_ENV == "production" ? "0.0.0.0" : "localhost",
});
console.log(`started deployer2 on :${port}`);