This commit is contained in:
Rizky 2024-01-21 16:16:11 +07:00
parent 41298aa26f
commit 9d72a13f7f
3 changed files with 12 additions and 20 deletions

View File

@ -1,13 +1,8 @@
FROM oven/bun:1.0.18-debian as base
WORKDIR /usr/src/prasi
RUN mkdir /usr/src/data
COPY . .
RUN apt-get update
RUN apt-get install -y zip
RUN bun i -g node-gyp-build-optional-packages
RUN bun install
WORKDIR /app/docker
RUN mkdir -p /app/prasi/repo
COPY docker.ts docker.ts
USER bun
EXPOSE 4550/tcp
CMD [ "bun", "run", "prod" ]
CMD [ "bun", "run", "docker.tsx" ]

11
coba.ts
View File

@ -1,11 +0,0 @@
Bun.serve({
port: 4550,
fetch(request, server) {
return new Response(
"Hello World\n\n" + process.env["DATABASE_URL"] + "\n\n" + process.cwd(),
{
status: 200,
}
);
},
});

8
docker.ts Normal file
View File

@ -0,0 +1,8 @@
Bun.serve({
port: 3000,
fetch(request, server) {
return new Response("Hello World\n\n" + process.cwd(), {
status: 200,
});
},
});