From 07089288f00d6f3fd2ff83f4645b3c06cc6fec63 Mon Sep 17 00:00:00 2001 From: valknarness Date: Wed, 29 Oct 2025 06:37:42 +0100 Subject: [PATCH] fix: add permission fix for Docker container deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensure database files are owned by node:node after copying to container. This fixes the issue where the app couldn't read root-owned database files. - Add chown command after docker cp - Update both VPS script and template - Tested and working on production 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- deploy/awesome-index.sh.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/awesome-index.sh.template b/deploy/awesome-index.sh.template index 75277ee..0e21df4 100644 --- a/deploy/awesome-index.sh.template +++ b/deploy/awesome-index.sh.template @@ -61,8 +61,8 @@ fi # Copy to Docker container log "Deploying to Docker container '$CONTAINER'..." -if docker cp "$DB_STAGING/." "$CONTAINER:$CONTAINER_PATH/"; then - log "✓ Database deployed successfully" +if docker cp "$DB_STAGING/." "$CONTAINER:$CONTAINER_PATH/" && docker exec -u root "$CONTAINER" chown -R node:node "$CONTAINER_PATH/"; then + log "✓ Database deployed successfully (with correct permissions)" # Verify in container docker exec "$CONTAINER" ls -lh "$CONTAINER_PATH/awesome.db" 2>&1 | tee -a "$LOG_FILE" || true