ci: 💚 Create master.key, Dockerfile precompile assets, uglifier harmony true

This commit is contained in:
Juan Rodriguez
2021-06-14 18:50:51 -05:00
parent 33eb56f686
commit d404cbf3b8
3 changed files with 19 additions and 4 deletions
+5
View File
@@ -9,6 +9,11 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Create master.key
uses: "finnp/create-file-action@master"
env:
FILE_NAME: "config/master.key"
FILE_DATA: ${{ secrets.SECRET_KEY_BASE }}
- name: Login to Heroku
run: heroku container:login
env:
+13 -3
View File
@@ -23,14 +23,24 @@ yarn
COPY ./entrypoint.sh /usr/bin/entrypoint.sh
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
RUN gem install bundler --version "$BUNDLE_VERSION"
COPY . .
COPY ./Gemfile .
COPY ./Gemfile.lock .
RUN bundle install --jobs 20 --retry 5
COPY ./package.json .
COPY ./yarn.lock .
RUN yarn
ENTRYPOINT ["entrypoint.sh"]
COPY . .
CMD ["rails", "s", "-b", "0.0.0.0"]
RUN chmod 600 config/master.key
RUN bundle exec rails assets:precompile
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]
+1 -1
View File
@@ -25,7 +25,7 @@ Rails.application.configure do
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
config.assets.js_compressor = Uglifier.new(harmony: true)
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.