The `PATH` env variable gets reset to it's original value by `su`, because its a "secure" env variable, and is _never_ preserved across user-switches. Because of this, the Postgres commands like `initdb` are not found on the `PATH`. This PR fixes this by setting the `PATH` in the command passed to `su` itself, so that `initdb` can now be found. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved the initialization process for local Postgres data folder to ensure compatibility with environment variables. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|---|---|---|
| .. | ||
| templates | ||
| utils | ||
| auto_heal.sh | ||
| caddy-reconfigure.mjs | ||
| entrypoint.sh | ||
| generate-infra-details.sh | ||
| healthcheck.sh | ||
| install_docker.sh | ||
| mongodb-fixer.sh | ||
| pull_resource.sh | ||
| run-caddy.sh | ||
| run-java.sh | ||
| run-postgres.sh | ||
| run-starting-page-init.sh | ||
| run-with-env.sh | ||
| start_app.sh | ||
| starting-page-init.py | ||