Merge pull request #2908 from bluewave-labs/fix/alpine-to-slim
fix build
This commit is contained in:
1 file changed
+7
-6
@@ -3,23 +3,24 @@ FROM node:20-slim AS frontend-build
|
|||||||
WORKDIR /app/client
|
WORKDIR /app/client
|
||||||
|
|
||||||
COPY client/package*.json ./
|
COPY client/package*.json ./
|
||||||
RUN npm ci
|
RUN npm ci --omit=optional
|
||||||
|
|
||||||
COPY client ./
|
COPY client ./
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|
||||||
FROM node:20-slim AS backend
|
FROM node:20-slim AS backend
|
||||||
|
|
||||||
WORKDIR /app/server
|
WORKDIR /app/server
|
||||||
|
|
||||||
COPY server ./
|
COPY server/package*.json ./
|
||||||
|
|
||||||
COPY --from=frontend-build /app/client/dist ./public
|
|
||||||
|
|
||||||
RUN npm ci --omit=optional
|
RUN npm ci --omit=optional
|
||||||
|
|
||||||
|
COPY server ./
|
||||||
|
COPY --from=frontend-build /app/client/dist ./public
|
||||||
|
|
||||||
RUN chmod +x ./scripts/inject-vars.sh
|
RUN chmod +x ./scripts/inject-vars.sh
|
||||||
|
|
||||||
EXPOSE 52345
|
EXPOSE 52345
|
||||||
|
|
||||||
CMD ./scripts/inject-vars.sh && node ./src/index.js
|
CMD ["sh", "-c", "./scripts/inject-vars.sh && node ./src/index.js"]
|
||||||
Reference in new issue
Block a user