#!/bin/sh set -e # Fix ownership of bind-mounted directories so appuser can write to them. # This runs briefly as root before dropping privileges, which is the only # way to handle host directories that Docker creates as root. chown -R appuser:appuser /app/backups /app/uploads 2>/dev/null || true exec gosu appuser "$@"