Xianbao QIAN commited on
Commit
9421338
1 Parent(s): a658051

basic HF settings

Browse files
Files changed (2) hide show
  1. Dockerfile +49 -0
  2. README.md +11 -0
Dockerfile ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1.4
2
+
3
+ FROM oven/bun:1 AS base
4
+
5
+ # Install dependencies only when needed
6
+ FROM base AS deps
7
+ WORKDIR /app
8
+
9
+ # Install dependencies based on the preferred package manager
10
+ COPY --link package.json bun.lockb* ./
11
+ RUN bun install --frozen-lockfile
12
+
13
+ # Rebuild the source code only when needed
14
+ FROM base AS builder
15
+ WORKDIR /app
16
+ COPY --from=deps --link /app/node_modules ./node_modules
17
+ COPY --link . .
18
+
19
+ # Next.js collects completely anonymous telemetry data about general usage.
20
+ # Uncomment the following line in case you want to disable telemetry during the build.
21
+ # ENV NEXT_TELEMETRY_DISABLED 1
22
+
23
+ RUN bun run build
24
+
25
+ # Production image, copy all the files and run next
26
+ FROM base AS runner
27
+ WORKDIR /app
28
+
29
+ ENV NODE_ENV production
30
+ # Uncomment the following line in case you want to disable telemetry during runtime.
31
+ # ENV NEXT_TELEMETRY_DISABLED 1
32
+
33
+ RUN \
34
+ addgroup --system --gid 1001 nodejs; \
35
+ adduser --system --uid 1001 nextjs
36
+
37
+ COPY --from=builder --link /app/public ./public
38
+
39
+ # Automatically leverage output traces to reduce image size
40
+ COPY --from=builder --link --chown=1001:1001 /app/.next/standalone ./
41
+ COPY --from=builder --link --chown=1001:1001 /app/.next/static ./.next/static
42
+
43
+ USER nextjs
44
+
45
+ EXPOSE 3000
46
+
47
+ ENV PORT 3000
48
+ ENV HOSTNAME 0.0.0.0
49
+ CMD ["bun", "run", "server.js"]
README.md CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2
 
3
  ## Getting Started
 
1
+ ---
2
+ title: Public data insights 🤗
3
+ emoji: 🔥
4
+ colorFrom: purple
5
+ colorTo: red
6
+ sdk: docker
7
+ pinned: true
8
+ app_port: 3000
9
+ license: apache-2.0
10
+ ---
11
+
12
  This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
13
 
14
  ## Getting Started