Skip to content

Commit 8ac0f15

Browse files
author
David Baum
committed
precompile assets when start container
1 parent 02eff6f commit 8ac0f15

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

evaluationserver/bin/docker_start

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ bundle install --jobs 4 --retry 3
99
echo "Clearing logs"
1010
bin/rake log:clear
1111

12+
production="production"
13+
14+
if [ "$RAILS_ENV" == "$production" ]
15+
then
16+
bin/rails assets:precompile
17+
fi
18+
1219
echo "Setting up new db if one doesn't exist"
1320
bundle exec rake db:migrate
1421

@@ -21,4 +28,4 @@ rm -f tmp/pids/server.pid
2128

2229

2330
echo "Starting app server"
24-
bundle exec rails s -p 8081 -b 0.0.0.0
31+
bundle exec rails s -p 8081 -b 0.0.0.0

0 commit comments

Comments
 (0)