@jakubmazanec/carson-templates 2.2.0 → 2.2.1-unstable.62dc85d
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/package.json
CHANGED
|
@@ -3,19 +3,25 @@ to: 'Dockerfile'
|
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
5
|
<%
|
|
6
|
-
let
|
|
6
|
+
let installDependenciesLines = ['COPY --link package-lock.json package.json ./'];
|
|
7
|
+
|
|
8
|
+
for (let project of workspace.projects) {
|
|
9
|
+
installDependenciesLines.push(`COPY --link ${project.relativePath}/package.json ${project.relativePath}/package.json`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let copyFilesLines = ['COPY package-lock.json package.json /workspace/'];
|
|
7
13
|
|
|
8
14
|
for (let project of workspace.projects) {
|
|
9
15
|
if (project.config.deployment?.appName) {
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
copyFilesLines.push(`COPY --from=build /workspace/${project.relativePath}/build /workspace/${project.relativePath}/build`);
|
|
17
|
+
copyFilesLines.push(`COPY --from=build /workspace/${project.relativePath}/package.json /workspace/${project.relativePath}/package.json`);
|
|
12
18
|
} else {
|
|
13
19
|
if (project.packageJson.bin) {
|
|
14
|
-
|
|
20
|
+
copyFilesLines.push(`COPY --from=build /workspace/${project.relativePath}/bin /workspace/${project.relativePath}/bin`);
|
|
15
21
|
}
|
|
16
22
|
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
copyFilesLines.push(`COPY --from=build /workspace/${project.relativePath}/build /workspace/${project.relativePath}/build`);
|
|
24
|
+
copyFilesLines.push(`COPY --from=build /workspace/${project.relativePath}/package.json /workspace/${project.relativePath}/package.json`);
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
-%>
|
|
@@ -42,7 +48,7 @@ RUN apt-get update -qq && \
|
|
|
42
48
|
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3
|
|
43
49
|
|
|
44
50
|
# Install dependencies
|
|
45
|
-
|
|
51
|
+
<%- installDependenciesLines.join('\n') %>
|
|
46
52
|
RUN npm ci --include=dev --ignore-scripts
|
|
47
53
|
|
|
48
54
|
# Copy the workspace
|
|
@@ -55,8 +61,7 @@ RUN npm run build
|
|
|
55
61
|
FROM base
|
|
56
62
|
|
|
57
63
|
# Copy files
|
|
58
|
-
|
|
59
|
-
<%- lines.join('\n') %>
|
|
64
|
+
<%- copyFilesLines.join('\n') %>
|
|
60
65
|
|
|
61
66
|
# Install dependencies
|
|
62
67
|
RUN npm ci --omit=dev --ignore-scripts
|