From a8bc41d3ea23264e0b30168e2c8d43e17d189215 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Mon, 29 Sep 2025 11:08:31 +0100 Subject: [PATCH] Fix deployment issue: add database folder to Dockerfile and deploy script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves "Cannot find module './database/init'" error during deployment by: - Properly copying the database folder to the Docker container - Including database folder in the deployment archive 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Dockerfile | 1 + deploy-with-password.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 501ed46..0b3922e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,7 @@ COPY --from=build /app/node_modules ./node_modules COPY --from=build /app/server.js ./ COPY --from=build /app/package.json ./ COPY --from=build /app/public ./public +COPY --from=build /app/database ./database # Меняем владельца файлов RUN chown -R nodeuser:nodejs /app diff --git a/deploy-with-password.sh b/deploy-with-password.sh index 9830e06..172b746 100755 --- a/deploy-with-password.sh +++ b/deploy-with-password.sh @@ -53,7 +53,8 @@ tar --exclude='.git' \ package.json \ package-lock.json \ server.js \ - public/ + public/ \ + database/ echo "✅ Архив создан: ${APP_NAME}-deploy.tar.gz"