mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-21 11:12:27 -05:00
23 lines
509 B
Bash
Executable File
23 lines
509 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
|
|
|
|
echo "Launching application..."
|
|
export RAILS_PORT=$PORT
|
|
export RAILS_LOG_TO_STDOUT=true
|
|
exec s6-setuidgid $PUID:$PGID $@
|