@smi-digital/create-smi-app 2.4.2 → 2.4.4
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/index.js
CHANGED
|
@@ -599,11 +599,15 @@ async function createIntegrations(options, projectRoot, templatesDir) {
|
|
|
599
599
|
await applySequentially(0);
|
|
600
600
|
await runStep("Configuring Astro SSR Adapter", async () => {
|
|
601
601
|
try {
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
602
|
+
const frontendDir = join5(projectRoot, "frontend");
|
|
603
|
+
await runCommandQuiet("npx", ["astro", "add", "node", "-y"], frontendDir);
|
|
604
|
+
const astroConfigPath = join5(frontendDir, "astro.config.mjs");
|
|
605
|
+
let astroConfig = await readFile4(astroConfigPath, "utf8");
|
|
606
|
+
astroConfig = astroConfig.replace(
|
|
607
|
+
"export default defineConfig({",
|
|
608
|
+
"export default defineConfig({\n output: 'server',"
|
|
606
609
|
);
|
|
610
|
+
await writeFile3(astroConfigPath, astroConfig);
|
|
607
611
|
} catch {
|
|
608
612
|
}
|
|
609
613
|
});
|
package/package.json
CHANGED
|
@@ -3,21 +3,35 @@
|
|
|
3
3
|
# Place this in your /backend folder
|
|
4
4
|
# ========================================================
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# Stage 1: Builder
|
|
7
|
+
FROM node:24-alpine as builder
|
|
7
8
|
# Installing libvips-dev for sharp Compatibility
|
|
8
9
|
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev curl > /dev/null 2>&1
|
|
9
|
-
ARG NODE_ENV=production
|
|
10
|
-
ENV NODE_ENV=${NODE_ENV}
|
|
11
10
|
|
|
12
11
|
WORKDIR /opt/
|
|
13
|
-
COPY package.json ./
|
|
12
|
+
COPY package.json package-lock.json* ./
|
|
14
13
|
RUN npm install -g node-gyp
|
|
15
|
-
RUN npm config set fetch-retry-maxtimeout 600000 -g && npm install
|
|
14
|
+
RUN npm config set fetch-retry-maxtimeout 600000 -g && npm install
|
|
16
15
|
ENV PATH=/opt/node_modules/.bin:$PATH
|
|
17
16
|
|
|
18
17
|
WORKDIR /opt/app
|
|
19
18
|
COPY . .
|
|
20
19
|
RUN npm run build
|
|
21
20
|
|
|
21
|
+
# Stage 2: Production
|
|
22
|
+
FROM node:24-alpine
|
|
23
|
+
RUN apk update && apk add --no-cache vips-dev curl > /dev/null 2>&1
|
|
24
|
+
ARG NODE_ENV=production
|
|
25
|
+
ENV NODE_ENV=${NODE_ENV}
|
|
26
|
+
|
|
27
|
+
WORKDIR /opt/
|
|
28
|
+
COPY package.json package-lock.json* ./
|
|
29
|
+
RUN npm install -g node-gyp
|
|
30
|
+
RUN npm config set fetch-retry-maxtimeout 600000 -g && npm install --omit=dev
|
|
31
|
+
ENV PATH=/opt/node_modules/.bin:$PATH
|
|
32
|
+
|
|
33
|
+
WORKDIR /opt/app
|
|
34
|
+
COPY --from=builder /opt/app ./
|
|
35
|
+
|
|
22
36
|
EXPOSE 1337
|
|
23
37
|
CMD ["npm", "run", "start"]
|