nuevo dockerfile para usar @empresa/prisma
This commit is contained in:
@@ -1,10 +1,20 @@
|
|||||||
# planilla/ui/Dockerfile
|
########## builder ##########
|
||||||
FROM node:18-alpine AS build
|
FROM node:18-alpine AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
|
||||||
RUN npm install
|
|
||||||
COPY . .
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
|
# ─── manifests de todo el monorepo ───
|
||||||
|
COPY package*.json ./ # raíz
|
||||||
|
COPY ui/package*.json ./ui/ # propio
|
||||||
|
# (si tu ui depende de algo en core, agent, etc. copiá también sus package.json)
|
||||||
|
|
||||||
|
# npm entiende workspaces porque ve el manifest raíz
|
||||||
|
RUN npm ci --workspaces --include-workspace-root --omit=dev
|
||||||
|
|
||||||
|
# ─── código fuente ───
|
||||||
|
COPY ui ./ui
|
||||||
|
RUN npm run --prefix ui build # usa scripts del paquete ui
|
||||||
|
|
||||||
|
########## runtime ##########
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/ui/dist /usr/share/nginx/html
|
||||||
|
EXPOSE 80
|
||||||
|
|||||||
Reference in New Issue
Block a user