start.sh 471 Bytes
Newer Older
1 2
#!/bin/sh

Zac Wood's avatar
Zac Wood committed
3
# generate a secret key for rails to use
4
export SECRET_KEY_BASE=$(rails secret)
Zac Wood's avatar
Zac Wood committed
5 6 7 8 9

# uncomment for faster docker builds during testing
#cp db/development.sqlite3 db/production.sqlite3

# load data from patriot web into database
10 11
# rails db:migrate
# rails db:seed
Zac Wood's avatar
Zac Wood committed
12

13 14 15 16 17 18
# docker doesn't remove the server socket when the container is closed
# so remove it if it's still there
if [ -f tmp/pids/server.pid ]; then
  rm tmp/pids/server.pid
fi

Zac Wood's avatar
Zac Wood committed
19
# start the server
20
rails s