mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
feat(build): ✨ Start Lysand from CLI in prod
This commit is contained in:
parent
6b83336fa3
commit
25d087a54b
|
|
@ -47,4 +47,4 @@ WORKDIR /app
|
|||
ENV NODE_ENV=production
|
||||
ENTRYPOINT [ "/bin/sh", "/app/entrypoint.sh" ]
|
||||
# Run migrations and start the server
|
||||
CMD [ "start" ]
|
||||
CMD [ "cli", "start" ]
|
||||
|
|
|
|||
|
|
@ -35,8 +35,13 @@ export default class Start extends BaseCommand<typeof Start> {
|
|||
|
||||
const numCPUs = flags["all-threads"] ? os.cpus().length : flags.threads;
|
||||
|
||||
// Check if index is a JS or TS file (depending on the environment)
|
||||
const index = (await Bun.file("index.ts").exists())
|
||||
? "index.ts"
|
||||
: "index.js";
|
||||
|
||||
for (let i = 0; i < numCPUs; i++) {
|
||||
const args = ["bun", "index.ts"];
|
||||
const args = ["bun", index];
|
||||
if (i !== 0 || flags.silent) {
|
||||
args.push("--silent");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue