<!-- TITLE: Entrypoint Sh --> <!-- SUBTITLE: For some case extended entrypoint file is required --> # Extended Entrypoint File ```sh #!/bin/sh set -e cd /opt/app export PGHOST=postgres echo "$DB_HOST:5432:$DB_NAME:$DB_USER:$DB_PASSWORD" > ~/.pgpass chmod 600 ~/.pgpass rake db:create if [ "$DB_SCHEMA_LOAD" -eq "1" ]; then rake db:schema:load else echo "echo pass" fi if [ "$DB_MIGRATE" -eq "1" ]; then rails db:migrate else echo "echo pass" fi if [ "$DB_SEED" -eq "1" ]; then rails db:seed else echo "echo pass" fi ln -sf /proc/1/fd/1 /opt/app/log/${RAILS_ENV}.log #bundle exec puma -b tcp://0.0.0.0:3000 -e ${RAILS_ENV} -C /opt/app/config/puma.rb bundle exec puma ```