Skip to content

Commit 03ceb98

Browse files
DEV: re-split build vs compile
Allow for assets to be precompiled fully in a build image. The only remaining things for configure is update themes, maxmind download, and css compiling.
1 parent b8f9eda commit 03ceb98

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

templates/web.template.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ run:
6161
PRECOMPILE_ON_BOOT=1
6262
fi
6363
if [ -f /usr/local/bin/create_db ] && [ "$CREATE_DB_ON_BOOT" = "1" ]; then /usr/local/bin/create_db; fi;
64-
if [ "$MIGRATE_ON_BOOT" = "1" ]; then su discourse -c 'bundle exec rake db:migrate'; fi
65-
if [ "$PRECOMPILE_ON_BOOT" = "1" ]; then SKIP_EMBER_CLI_COMPILE=1 su discourse -c 'bundle exec rake assets:precompile'; fi
64+
if [ "$MIGRATE_ON_BOOT" = "1" ]; then su discourse -c 'bundle exec rake db:migrate' || exit 1; fi
65+
if [ "$PRECOMPILE_ON_BOOT" = "1" ]; then su discourse -c 'bundle exec rake maxminddb:refresh assets:precompile:css' || exit 1; fi
6666
LD_PRELOAD=$RUBY_ALLOCATOR HOME=/home/discourse USER=discourse exec thpoff chpst -u discourse:www-data -U discourse:www-data bundle exec config/unicorn_launcher -E production -c config/unicorn.conf.rb
6767
6868
- file:
@@ -215,13 +215,13 @@ run:
215215
tag: build
216216
hook: assets_precompile_build
217217
cmd:
218-
- su discourse -c 'bundle exec rake assets:precompile:build'
218+
- su discourse -c 'SKIP_DB_AND_REDIS=1 bundle exec rake assets:precompile'
219219
- exec:
220220
cd: $home
221221
tag: precompile
222222
hook: assets_precompile
223223
cmd:
224-
- su discourse -c 'SKIP_EMBER_CLI_COMPILE=1 bundle exec rake themes:update assets:precompile'
224+
- su discourse -c 'bundle exec rake themes:update maxminddb:refresh assets:precompile:css'
225225
- replace:
226226
tag: precompile
227227
filename: /etc/service/unicorn/run

0 commit comments

Comments
 (0)