fix
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
FROM node:20-alpine AS frontend
|
||||
WORKDIR /frontend
|
||||
COPY ../frontend/package*.json ./
|
||||
RUN npm ci || npm i
|
||||
COPY ../frontend/ .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20-alpine
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
COPY package*.json ./
|
||||
RUN npm ci --only=production || npm i --only=production
|
||||
|
||||
COPY . .
|
||||
# Overwrite static with built SPA
|
||||
COPY --from=frontend /frontend/dist /app/public
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "index.js"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user