Skip to content

Commit 56458bd

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 64f31db commit 56458bd

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
@@ -62,8 +62,8 @@ run:
6262
PRECOMPILE_ON_BOOT=1
6363
fi
6464
if [ -f /usr/local/bin/create_db ] && [ "$CREATE_DB_ON_BOOT" = "1" ]; then /usr/local/bin/create_db; fi;
65-
if [ "$MIGRATE_ON_BOOT" = "1" ]; then su discourse -c 'bundle exec rake db:migrate'; fi
66-
if [ "$PRECOMPILE_ON_BOOT" = "1" ]; then SKIP_EMBER_CLI_COMPILE=1 su discourse -c 'bundle exec rake assets:precompile'; fi
65+
if [ "$MIGRATE_ON_BOOT" = "1" ]; then su discourse -c 'bundle exec rake db:migrate' || exit 1; fi
66+
if [ "$PRECOMPILE_ON_BOOT" = "1" ]; then su discourse -c 'bundle exec rake maxminddb:refresh assets:precompile:css' || exit 1; fi
6767
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
6868
6969
- file:
@@ -216,13 +216,13 @@ run:
216216
tag: build
217217
hook: assets_precompile_build
218218
cmd:
219-
- su discourse -c 'bundle exec rake assets:precompile:build'
219+
- su discourse -c 'SKIP_DB_AND_REDIS=1 bundle exec rake assets:precompile'
220220
- exec:
221221
cd: $home
222222
tag: precompile
223223
hook: assets_precompile
224224
cmd:
225-
- su discourse -c 'SKIP_EMBER_CLI_COMPILE=1 bundle exec rake themes:update assets:precompile'
225+
- su discourse -c 'bundle exec rake themes:update maxminddb:refresh assets:precompile:css'
226226
- replace:
227227
tag: precompile
228228
filename: /etc/service/unicorn/run

0 commit comments

Comments
 (0)