fix
This commit is contained in:
parent
66d3cd8153
commit
44af8748b7
15
Dockerfile
15
Dockerfile
|
|
@ -1,13 +1,14 @@
|
|||
# use the official Bun image
|
||||
# see all versions at https://hub.docker.com/r/oven/bun/tags
|
||||
FROM oven/bun:debian as base
|
||||
WORKDIR /usr/src/app
|
||||
FROM oven/bun:alpine as base
|
||||
|
||||
RUN apt update
|
||||
RUN apt install git
|
||||
RUN apk update
|
||||
RUN apk add curl unzip nodejs npm
|
||||
|
||||
RUN git clone https://github.com/rizrmd/prasi-bun --depth=1
|
||||
USER bun
|
||||
RUN mkdir /prasi
|
||||
RUN curl https://github.com/rizrmd/prasi-bun/archive/refs/heads/main.zip -Lo /prasi/main.zip --verbose
|
||||
RUN unzip /prasi/main.zip -d /prasi
|
||||
WORKDIR /prasi/prasi-bun-main
|
||||
RUN bun i
|
||||
EXPOSE 4550/tcp
|
||||
RUN cd app/db && bun prisma db pull && bun prisma generate
|
||||
ENTRYPOINT [ "bun", "prod" ]
|
||||
|
|
@ -23,17 +23,17 @@ if (g.mode === "dev") {
|
|||
}
|
||||
|
||||
await preparePrisma();
|
||||
// await ensureNotRunning();
|
||||
await ensureNotRunning();
|
||||
|
||||
// if (g.db) {
|
||||
// g.db.$connect().catch((e: any) => {
|
||||
// g.log.error(`[DB ERROR]\n${e.message}`);
|
||||
// });
|
||||
// }
|
||||
if (g.db) {
|
||||
g.db.$connect().catch((e: any) => {
|
||||
g.log.error(`[DB ERROR]\n${e.message}`);
|
||||
});
|
||||
}
|
||||
|
||||
// createServer();
|
||||
// await parcelBuild();
|
||||
// await generateAPIFrm();
|
||||
// await prepareApiRoutes();
|
||||
// await prepareAPITypes();
|
||||
// g.status = "ready";
|
||||
createServer();
|
||||
await parcelBuild();
|
||||
await generateAPIFrm();
|
||||
await prepareApiRoutes();
|
||||
await prepareAPITypes();
|
||||
g.status = "ready";
|
||||
|
|
|
|||
Loading…
Reference in New Issue