Subir archivos a "/"

This commit is contained in:
2026-02-07 21:19:03 +00:00
parent 1f9aac7993
commit aa2800b203
4 changed files with 70 additions and 23 deletions

View File

@@ -3,21 +3,18 @@ FROM node:22-alpine
WORKDIR /app
# 👇 rompe cache (cambia este número si sigue cacheando)
ARG CACHE_BUST=1
# Copiamos manifests primero
# Copy manifests first for better caching
COPY package*.json ./
# 👇 DEBUG: que lo veamos en logs sí o sí
RUN echo "CACHE_BUST=$CACHE_BUST" \
&& ls -la \
&& echo "---- package-lock exists? ----" \
&& (test -f package-lock.json && echo "OK: package-lock.json found" || (echo "ERROR: package-lock.json NOT found" && exit 1))
# Install prod deps (works even if package-lock is missing or minimal)
RUN --mount=type=cache,target=/root/.npm npm install --omit=dev
# Copy the rest
COPY . .
ENV NODE_ENV=production
EXPOSE 3000
CMD ["npm","run","start"]
# Prisma client is generated on install, but ensure at runtime if needed:
# (Coolify/containers usually run as root in alpine; OK)
CMD ["sh","-c","node -e "console.log('API starting')" && node src/server.js"]