mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-21 19:22:18 -05:00
32 lines
722 B
Bash
Executable File
32 lines
722 B
Bash
Executable File
#!/bin/ash
|
|
set -e
|
|
if [ -f tmp/pids/server.pid ]; then
|
|
rm tmp/pids/server.pid
|
|
fi
|
|
|
|
echo "Preparing database..."
|
|
bundle exec rails db:prepare:with_data
|
|
|
|
echo "Setting database file ownership (SQLite3 only)..."
|
|
bundle exec rake db:chown
|
|
|
|
echo "Cleaning up old cache files..."
|
|
bundle exec rake tmp:cache:clear
|
|
|
|
echo "Setting temporary directory permissions..."
|
|
chown -R $PUID:$PGID tmp log
|
|
|
|
if [ ! -d $PLUGINS_PATH ]; then
|
|
echo "Creating plugin directory..."
|
|
mkdir -p "$PLUGINS_PATH"
|
|
fi
|
|
if [ -w $PLUGINS_PATH ]; then
|
|
echo "Setting plugin directory owner..."
|
|
chown $PUID:$PGID "$PLUGINS_PATH"
|
|
fi
|
|
|
|
echo "Launching application..."
|
|
export RAILS_PORT=$PORT
|
|
export RAILS_LOG_TO_STDOUT=true
|
|
exec s6-setuidgid $PUID:$PGID $@
|