Try number idk how much
This commit is contained in:
@@ -7,6 +7,7 @@ RUN bun install --frozen-lockfile
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
ENV NODE_ENV=prod
|
ENV NODE_ENV=prod
|
||||||
|
ENV DOCKER=1
|
||||||
RUN bun bundle
|
RUN bun bundle
|
||||||
|
|
||||||
FROM oven/bun
|
FROM oven/bun
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ const files = [
|
|||||||
eventFiles.map(f => `src/events/${f}`)
|
eventFiles.map(f => `src/events/${f}`)
|
||||||
].flat()
|
].flat()
|
||||||
|
|
||||||
|
const banner = [
|
||||||
|
"process.env.BUILD = 'true'",
|
||||||
|
process.env.DOCKER === "1" ? "process.env.DOCKER = '1'" : null
|
||||||
|
].filter(v => typeof v === "string").join("\n")
|
||||||
|
|
||||||
await Bun.build({
|
await Bun.build({
|
||||||
entrypoints: ["src/index.ts", ...files],
|
entrypoints: ["src/index.ts", ...files],
|
||||||
outdir: "dist",
|
outdir: "dist",
|
||||||
@@ -32,5 +37,5 @@ await Bun.build({
|
|||||||
asset: "asset/[name]-[hash].[ext]"
|
asset: "asset/[name]-[hash].[ext]"
|
||||||
},
|
},
|
||||||
root: "src",
|
root: "src",
|
||||||
banner: "process.env.BUILD = 'true'"
|
banner
|
||||||
})
|
})
|
||||||
|
|||||||
2
src/enviroment.d.ts
vendored
2
src/enviroment.d.ts
vendored
@@ -3,6 +3,8 @@ declare global {
|
|||||||
interface ProcessEnv {
|
interface ProcessEnv {
|
||||||
NODE_ENV?: "dev" | "prod"
|
NODE_ENV?: "dev" | "prod"
|
||||||
TYPESCRIPT?: "true"
|
TYPESCRIPT?: "true"
|
||||||
|
BUILD?: "true"
|
||||||
|
DOCKER?: "1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export type LoadEventsOptions = {
|
export type LoadEventsOptions = {
|
||||||
ft: "ts" | "js"
|
ft: "ts" | "js"
|
||||||
dir: "src" | "dist"
|
dir: "src" | "dist" | ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const client = new Client()
|
|||||||
const redis = new RedisClient(env.prod.REDISURI)
|
const redis = new RedisClient(env.prod.REDISURI)
|
||||||
|
|
||||||
const ft = process.env.BUILD !== "true" ? "ts" : "js"
|
const ft = process.env.BUILD !== "true" ? "ts" : "js"
|
||||||
const dir = process.env.BUILD !== "true" ? "src" : "dist"
|
const dir = process.env.DOCKER !== "1" ? process.env.BUILD !== "true" ? "src" : "dist" : ""
|
||||||
|
|
||||||
class Illegitimate {
|
class Illegitimate {
|
||||||
async start() {
|
async start() {
|
||||||
|
|||||||
Reference in New Issue
Block a user