Files
beauty-bookings/start.sh
elpatron ffc21a76e7 Fix: Resolve permission issues with .storage directories
- Install su-exec in Dockerfile for user switching
- Modified start.sh to create directories as root, then change ownership
- Container starts as root but switches to nextjs user for app execution
- This prevents permission denied errors when creating .storage directories
2025-10-01 23:07:33 +02:00

15 lines
403 B
Bash

#!/bin/sh
# Create .storage directories if they don't exist (as root)
mkdir -p /app/.storage/users
mkdir -p /app/.storage/bookings
mkdir -p /app/.storage/treatments
mkdir -p /app/.storage/availability
mkdir -p /app/.storage/cancellation-tokens
# Change ownership to nextjs user
chown -R nextjs:nodejs /app/.storage
# Start the application as nextjs user
exec su-exec nextjs node server-dist/index.js