fix: copy compiled medusa-config.js for production runtime
This commit is contained in:
@@ -28,6 +28,10 @@ ENV NODE_OPTIONS="--max-old-space-size=2048"
|
||||
# Build Medusa backend and admin dashboard
|
||||
RUN npm run build --workspace=@dtc/backend
|
||||
|
||||
# Copy compiled medusa-config.js and instrumentation.js to project root for production Node.js runtime
|
||||
RUN cp apps/backend/.medusa/server/medusa-config.js apps/backend/medusa-config.js && \
|
||||
if [ -f apps/backend/.medusa/server/instrumentation.js ]; then cp apps/backend/.medusa/server/instrumentation.js apps/backend/instrumentation.js; fi
|
||||
|
||||
# Prune devDependencies to keep image light and avoid OOM during copy
|
||||
RUN npm prune --production --workspace=@dtc/backend
|
||||
|
||||
|
||||
Reference in New Issue
Block a user