@eventcatalog/create-eventcatalog 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/default/Dockerfile +14 -30
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/dist/default/Dockerfile
CHANGED
|
@@ -1,36 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Install dependencies only when needed
|
|
4
|
-
FROM node:16-alpine AS deps
|
|
5
|
-
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
|
6
|
-
RUN apk add --no-cache libc6-compat
|
|
7
|
-
WORKDIR /app
|
|
8
|
-
COPY package.json yarn.lock ./
|
|
9
|
-
RUN yarn install --frozen-lockfile
|
|
10
|
-
|
|
11
|
-
# Rebuild the source code only when needed
|
|
12
|
-
FROM node:16-alpine AS builder
|
|
1
|
+
# Build Stage
|
|
2
|
+
FROM node:16-alpine AS BUILD_IMAGE
|
|
13
3
|
WORKDIR /app
|
|
14
|
-
COPY
|
|
4
|
+
COPY package*.json ./
|
|
5
|
+
RUN npm ci
|
|
15
6
|
COPY . .
|
|
16
|
-
RUN
|
|
17
|
-
|
|
18
|
-
# Production image, copy all the files and run next
|
|
19
|
-
FROM node:16-alpine AS runner
|
|
20
|
-
WORKDIR /app
|
|
21
|
-
|
|
22
|
-
ENV NODE_ENV production
|
|
7
|
+
RUN npm run build
|
|
23
8
|
|
|
24
|
-
RUN addgroup -g 1001 -S nodejs
|
|
25
|
-
RUN adduser -S nextjs -u 1001
|
|
26
|
-
RUN /bin/sh -c "apk add --no-cache bash"
|
|
27
|
-
|
|
28
|
-
COPY --from=builder --chown=nextjs:nodejs /app ./
|
|
29
|
-
|
|
30
|
-
USER nextjs
|
|
31
9
|
|
|
10
|
+
# Production Stage
|
|
11
|
+
FROM node:16-alpine AS PRODUCTION_STAGE
|
|
12
|
+
WORKDIR /app
|
|
13
|
+
COPY --from=BUILD_IMAGE /app/package*.json ./
|
|
14
|
+
COPY --from=BUILD_IMAGE /app/.next ./.next
|
|
15
|
+
COPY --from=BUILD_IMAGE /app/.eventcatalog-core ./.eventcatalog-core
|
|
16
|
+
COPY --from=BUILD_IMAGE /app/public ./public
|
|
17
|
+
COPY --from=BUILD_IMAGE /app/node_modules ./node_modules
|
|
18
|
+
ENV NODE_ENV=production
|
|
32
19
|
EXPOSE 3000
|
|
33
|
-
|
|
34
|
-
ENV PORT 3000
|
|
35
|
-
|
|
36
20
|
CMD ["npm", "start"]
|