schleifer
(Andrew Schleifer)
April 27, 2020, 2:53am
2
It’s a SHA1 hash of the file contents. It’s generated here:
# frozen_string_literal: true
task "assets:precompile:build" do
if ENV["SKIP_EMBER_CLI_COMPILE"] != "1"
ember_version = ENV["EMBER_VERSION"] || "5"
raise "Unknown ember version '#{ember_version}'" if !%w[5].include?(ember_version)
compile_command = "EMBER_ENV=production #{Rails.root.join("script/assemble_ember_build.rb")}"
only_ember_precompile_build_remaining = (ARGV.last == "assets:precompile:build")
only_assets_precompile_remaining = (ARGV.last == "assets:precompile")
# Using exec to free up Rails app memory during ember build
if only_ember_precompile_build_remaining
exec "#{compile_command}"
elsif only_assets_precompile_remaining
exec "#{compile_command} && SKIP_EMBER_CLI_COMPILE=1 bin/rake assets:precompile"
else
system compile_command, exception: true
This file has been truncated. show original
The compiled versions that get used are put in /var/www/discourse/public/assets/.
If you add a stanza to your app.yml you can perform an action after the container is rebuilt. For example, to upload to S3 we use something similar to:
hooks:
after_assets_precompile:
- exec:
cd: $home
cmd:
- sudo -E -u discourse bundle exec rake s3:upload_assets
In your case, replace the rake task with the commands you run to push the compiled assets to Github when the container is built.