1
1
# Stage 1: Build the Vue.js application
2
- FROM node:14 AS build-stage
2
+ FROM node:23 AS build-stage
3
3
4
4
USER node
5
5
WORKDIR /app
6
6
7
7
COPY --chown=1000:1000 package*.json ./
8
8
RUN npm install
9
9
COPY --chown=1000:1000 . .
10
- # this will tokenize the app
11
10
RUN npm run build
12
11
13
12
# Stage 2: Prepare the Node.js API
14
- FROM node:14 AS api-stage
13
+ FROM node:23 AS api-stage
14
+
15
15
WORKDIR /api
16
+
16
17
# Copy package.json and other necessary files for the API
17
18
COPY --chown=1000:1000 api/package*.json ./
18
- RUN npm install \
19
- && chown -R 1000:1000 /api
19
+ RUN npm install && \
20
+ chown -R 1000:1000 /api && \
21
+ apt-get update && \
22
+ apt-get install -y --no-install-recommends gettext-base && \
23
+ apt-get clean && \
24
+ rm -rf /var/lib/apt/lists/*
20
25
21
26
# Copy the rest of your API source code
22
27
COPY --chown=1000:1000 api/ .
@@ -25,14 +30,11 @@ COPY --chown=1000:1000 api/ .
25
30
COPY --chown=1000:1000 --from=build-stage /app/dist /api/public
26
31
COPY --chown=1000:1000 --from=build-stage /app/dist/assets/app-config.js /api/app-config.template.js
27
32
28
- # install gettext-base for envsubst
29
- RUN apt-get update && apt-get install -y gettext-base
30
-
31
33
# Expose the port your API will run on
32
34
EXPOSE 3000
33
35
34
36
# Command to run your API (and serve your Vue.js app)
35
37
RUN chmod +x /api/docker-entrypoint.api/entrypoint.sh
36
38
37
39
USER node
38
- ENTRYPOINT ["/api/docker-entrypoint.api/entrypoint.sh" ]
40
+ ENTRYPOINT ["/api/docker-entrypoint.api/entrypoint.sh" ]
0 commit comments