Skip to content

Commit 40ad1b5

Browse files
committed
📘 doc: update docker file
1 parent 79d2e48 commit 40ad1b5

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

docs/integrations/docker.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,29 @@ head:
1616

1717
# Docker
1818
You use Elysia with Docker with the following Dockerfile below:
19-
```typescript
19+
```docker
20+
FROM oven/bun
21+
22+
WORKDIR /app
23+
24+
COPY package.json .
25+
COPY bun.lockb .
26+
27+
RUN bun install --production
28+
29+
COPY src src
30+
COPY tsconfig.json .
31+
# COPY public public
32+
33+
ENV NODE_ENV production
34+
CMD ["bun", "src/index.ts"]
35+
36+
EXPOSE 3000
37+
```
38+
39+
## Distroless
40+
If you like to use Distroless:
41+
```docker
2042
FROM debian:11.6-slim as builder
2143
2244
WORKDIR /app
@@ -40,10 +62,10 @@ COPY --from=builder /root/.bun/bin/bun bun
4062
COPY --from=builder /app/node_modules node_modules
4163
4264
COPY src src
65+
COPY tsconfig.json .
4366
# COPY public public
44-
# COPY tsconfig.json .
4567
46-
ENV ENV production
68+
ENV NODE_ENV production
4769
CMD ["./bun", "src/index.ts"]
4870
4971
EXPOSE 3000

0 commit comments

Comments
 (0)