Fix
This commit is contained in:
@ -36,4 +36,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|||||||
CMD bun -e "fetch('http://localhost:3000').then(() => process.exit(0)).catch(() => process.exit(1))"
|
CMD bun -e "fetch('http://localhost:3000').then(() => process.exit(0)).catch(() => process.exit(1))"
|
||||||
|
|
||||||
# Start both servers with proper process management
|
# Start both servers with proper process management
|
||||||
CMD ["sh", "-c", "bun run /app/server.ts & (wait 10 && bun run /app/admin-server.ts) & wait"]
|
CMD ["sh", "-c", "bun run /app/server.ts & (sleep 10 && bun run /app/admin-server.ts) & wait"]
|
||||||
|
@ -25,6 +25,15 @@ import {
|
|||||||
updateSetting,
|
updateSetting,
|
||||||
} from "./services/database.js";
|
} from "./services/database.js";
|
||||||
|
|
||||||
|
// Regenerate static files on startup
|
||||||
|
try {
|
||||||
|
const { regenerateStartupFiles } = await import("./services/podcast.js");
|
||||||
|
await regenerateStartupFiles();
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Failed to regenerate startup files on admin server:", error);
|
||||||
|
// Don't exit - the admin server can still work without the regenerated files
|
||||||
|
}
|
||||||
|
|
||||||
const app = new Hono();
|
const app = new Hono();
|
||||||
|
|
||||||
// Basic Authentication middleware (if credentials are provided)
|
// Basic Authentication middleware (if credentials are provided)
|
||||||
|
Reference in New Issue
Block a user