-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (27 loc) · 870 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Dockerfile with PNPM+Bun - v1.0.0
# https://gist.github.com/sandros94/03675514546f17af1fd6db3863c043b4
# Build container
FROM node:20-alpine AS builder
# Enable Corepack
RUN corepack enable
# Cartella della webapp
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install Dependencies
COPY pnpm-lock.yaml ./
RUN pnpm fetch --shamefully-hoist
ARG NUXT_UI_PRO_LICENSE
# Build production
COPY . ./
RUN pnpm install --offline && pnpm run dev:prepare
RUN pnpm run docs:build
# Final production container
FROM node:20-alpine AS runtime
USER node
WORKDIR /app
COPY --link --from=builder /usr/src/app/docs/.output/ ./.output
COPY --link --from=builder /usr/src/app/docs/content/ ./content
EXPOSE 3000
HEALTHCHECK --retries=10 --start-period=25s \
CMD wget --no-verbose --spider http://0.0.0.0:3000/ || exit 1
ENTRYPOINT [ "node", ".output/server/index.mjs" ]