#!/bin/bash # Set the correct permissions on the /app directory as root chmod -R 777 /app # Start the FastAPI application as root initially exec "$@" # Optionally, switch to a non-root user if needed # USER 1000 # exec gosu 1000 "$@"