File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed
Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ node_modules
2+ .build
3+ .cache
4+ dist
5+ .tmp
6+ .tmp /*
7+ coverage
8+
9+ .git
10+ .gitignore
11+
12+ Dockerfile
13+ docker-compose.yml
14+ .env
15+
16+ npm-debug.log
17+ yarn-error.log
18+
Original file line number Diff line number Diff line change 1+ ARG NODE_VERSION=20-alpine
2+
3+ FROM node:${NODE_VERSION} AS deps
4+ WORKDIR /app
5+
6+ RUN corepack enable || true
7+
8+ COPY package.json yarn.lock ./
9+ RUN yarn install --frozen-lockfile
10+
11+ FROM node:${NODE_VERSION} AS build
12+ WORKDIR /app
13+
14+ RUN corepack enable || true
15+
16+ COPY --from=deps /app/node_modules ./node_modules
17+ COPY . .
18+
19+ ENV NODE_OPTIONS=--max_old_space_size=4096
20+ RUN yarn build
21+
22+ FROM node:${NODE_VERSION} AS runtime
23+ WORKDIR /app
24+
25+ ENV NODE_ENV=production
26+ ENV TZ=America/Sao_Paulo
27+
28+ RUN addgroup -S strapi && adduser -S strapi -G strapi
29+
30+ COPY --from=build --chown=strapi:strapi /app /app
31+
32+ USER strapi
33+
34+ EXPOSE 1337
35+
36+ CMD ["node" , "node_modules/@strapi/strapi/bin/strapi.js" , "start" ]
37+
You can’t perform that action at this time.
0 commit comments