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