Commit 1d71a83 1 parent f16c56a commit 1d71a83 Copy full SHA for 1d71a83
File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
- FROM node:12.18.2-alpine3.11
1
+ FROM node:12.18.2-alpine3.11 AS deps
2
2
3
3
WORKDIR /app
4
+
4
5
COPY ["package.json" , "yarn.lock" , "./" ]
5
6
COPY src src
6
7
7
- RUN find src \! -name "package.json" -mindepth 2 -maxdepth 2 -print | xargs rm -rf
8
+ RUN find src \! -name "package.json" \
9
+ -mindepth 2 \
10
+ -maxdepth 2 \
11
+ -print \
12
+ | xargs rm -rf
8
13
9
14
FROM node:12.18.2-alpine3.11
10
15
11
16
ENV NODE_ENV production
12
17
13
18
WORKDIR /app
14
- COPY --from=0 /app .
19
+
20
+ COPY --from=deps /app .
15
21
16
22
RUN yarn install --frozen-lockfile --production=true
17
23
@@ -20,6 +26,7 @@ COPY . .
20
26
# To restore workspaces symlinks
21
27
RUN yarn install --frozen-lockfile --production=true && \
22
28
chmod -R 755 scripts src && \
29
+ touch .env && \
23
30
touch ~/.env && \
24
31
cat crond/crontab >> /var/spool/cron/crontabs/root
25
32
You can’t perform that action at this time.
0 commit comments