fix: add permission fix for Docker container deployment
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user