File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
# Docker
18
18
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
20
42
FROM debian:11.6-slim as builder
21
43
22
44
WORKDIR /app
@@ -40,10 +62,10 @@ COPY --from=builder /root/.bun/bin/bun bun
40
62
COPY --from=builder /app/node_modules node_modules
41
63
42
64
COPY src src
65
+ COPY tsconfig.json .
43
66
# COPY public public
44
- # COPY tsconfig .json .
45
67
46
- ENV ENV production
68
+ ENV NODE_ENV production
47
69
CMD ["./bun", "src/index.ts"]
48
70
49
71
EXPOSE 3000
You can’t perform that action at this time.
0 commit comments