mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
60b90bf657
* Allow more than 2 pg versions to be installed * Ensure PATH is updated with PGBIN * Ensure all variables are set
20 lines
706 B
Bash
Executable File
20 lines
706 B
Bash
Executable File
#!/bin/bash
|
|
set -euxo pipefail
|
|
|
|
# Ensure we can write in /tmp/op_uploaded_files (cf. #29112)
|
|
mkdir -p /tmp/op_uploaded_files/ && chown -R $APP_USER:$APP_USER /tmp/op_uploaded_files/
|
|
|
|
# Remove any existing config/database.yml
|
|
rm -f ./config/database.yml
|
|
|
|
# We need this so puma is allowed to create the tmp/pids folder and
|
|
# temporary upload files when running with a uid other than 1000 (app)
|
|
# but with an allowed supplemental group (1000).
|
|
tmp_path="$APP_PATH/tmp"
|
|
# Remove any previously cached files from e.g., asset building
|
|
rm -rf "$tmp_path"
|
|
# Recreate and own it for the user for later files (PID etc. see above)
|
|
mkdir -p "$tmp_path"
|
|
chown -R $APP_USER:$APP_USER "$tmp_path"
|
|
chmod g+rw "$tmp_path"
|