a11yist/bin/entrypoint
david 6f453b7017
Some checks failed
/ Run tests (push) Successful in 1m30s
/ Run system tests (push) Failing after 1m35s
/ Build, push and deploy image (push) Failing after 31s
Trigger image rebuild
2024-10-01 01:45:52 +02:00

26 lines
548 B
Bash
Executable file

#!/bin/ash
set -e
if [ -f tmp/pids/server.pid ]; then
rm tmp/pids/server.pid
fi
# Make the if statement match any invocation of the "rails server" command
if [[ "${1}" == *rails ]] && ([ "${2}" == "server" ] || [ "${2}" == "s" ]); then
echo "+ preparing database..."
./bin/rails db:prepare
echo "- preparing database done."
if [ -n "$ASSETS_PATH" ]; then
echo "+ copying assets..."
cp -nr public/* $ASSETS_PATH
echo "- copying assets done."
fi
bundle config
fi
# Execute the given or default command:
exec "${@}"