You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a docker-compose build is done, the final container has its node_modules directory emptied.
This may be undesirable in cases where the built image is expected to operate on dependencies (Not a web server, but a collection of scripts, for example).
This behavior is not present when using Raw Docker Compose Deployment. However, this causes other features to be lost.
FROM node:20-alpine AS base
ENV PNPM_HOME="/pnpm"ENV PATH="$PNPM_HOME:$PATH"RUN corepack enable pnpm
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
FROM base AS builder
WORKDIR /app
COPY . .
# We go from installer instead of base because this project is really just meant to execute pnpm commands as a collection of scripts# So we need pnpm and deps to be installed in the actual final imageFROM base AS runner
WORKDIR /app
COPY --from=builder /app/ .
RUN pnpm install --frozen-lockfile --prefer-offline
CMD ["sleep", "infinity"]
Steps to Reproduce
Create a node project
Create dockerfile & compose
Build locally and notice container has node_modules
Build in coolify and notice that node_modules is empty
Example Repository URL
No response
Coolify Version
v4.0.0-beta.379
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 22.04
Additional Information
I don't see this behavior documented (Am I missing it?). Or how to work around it without going the Raw Docker Compose Deployment route, which is undesireable
The text was updated successfully, but these errors were encountered:
douglasg14b
changed the title
[Bug]: Coolify deletes node_modules contents
[Bug]: Coolify deletes node_modules contents
Dec 18, 2024
douglasg14b
changed the title
[Bug]: Coolify deletes node_modules contents
[Bug]: Coolify deletes node_modules contents in docker-compose deployments
Dec 18, 2024
Error Message and Logs
When a docker-compose build is done, the final container has its node_modules directory emptied.
This may be undesirable in cases where the built image is expected to operate on dependencies (Not a web server, but a collection of scripts, for example).
This behavior is not present when using
Raw Docker Compose Deployment
. However, this causes other features to be lost.Steps to Reproduce
Example Repository URL
No response
Coolify Version
v4.0.0-beta.379
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 22.04
Additional Information
I don't see this behavior documented (Am I missing it?). Or how to work around it without going the
Raw Docker Compose Deployment
route, which is undesireableThe text was updated successfully, but these errors were encountered: