Fix deployment issue: add database folder to Dockerfile and deploy script
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 <noreply@anthropic.com>
This commit is contained in:
parent
d1b5b72c46
commit
a8bc41d3ea
2 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ tar --exclude='.git' \
|
|||
package.json \
|
||||
package-lock.json \
|
||||
server.js \
|
||||
public/
|
||||
public/ \
|
||||
database/
|
||||
|
||||
echo "✅ Архив создан: ${APP_NAME}-deploy.tar.gz"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue