OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/docker/prod/setup/postinstall.sh

32 lines
819 B

#!/bin/bash
set -e
set -o pipefail
export PGBIN="$(pg_config --bindir)"
display_error() {
echo " !--> ERROR on postinstall:"
tail -n 200 /tmp/dockerize.log
exit 1
}
echo " ---> POSTINSTALL"
# Add MySQL-to-Postgres migration script to path (used in entrypoint.sh)
cp ./docker/prod/mysql-to-postgres/bin/migrate-mysql-to-postgres /usr/local/bin/
# 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/
rm -f ./config/database.yml
if test -f ./docker/prod/setup/postinstall-$PLATFORM.sh ; then
echo " ---> Executing postinstall for $PLATFORM..."
./docker/prod/setup/postinstall-$PLATFORM.sh
fi
echo " ---> Precompiling assets. This will take a while..."
./docker/prod/setup/postinstall-common.sh
echo " OK."