We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb2b673 commit f33a368Copy full SHA for f33a368
1 file changed
web/Containerfile
@@ -0,0 +1,28 @@
1
+# Context is ..
2
+FROM oven/bun:1-debian AS base
3
+WORKDIR /src
4
+
5
+# Install deps
6
+COPY package.json bun.lock ./
7
+COPY backend/package.json backend/package.json
8
+COPY mclib/package.json mclib/package.json
9
+COPY cli/package.json cli/package.json
10
+COPY web/package.json web/package.json
11
+RUN --mount=type=cache,target=/root/.bun/install/cache bun install --filter=web
12
13
+# Copy project
14
+COPY web/ web/
15
+COPY mclib/ mclib/
16
17
+# Build project
18
+WORKDIR /src/web
19
+RUN bun run build
20
21
+# To allow copying only the build output
22
+FROM scratch AS assets
23
+COPY --from=base /src/web/build /
24
25
+# Final stage, serve with nginx
26
+FROM nginx AS final
27
+COPY --from=assets / /usr/share/nginx/html
28
+EXPOSE 80
0 commit comments