Updated Gemfile and scripts for supporting Heroku (#542)

* Include sqlite only for test and development

* Updated db config

* added assed precompile as a fallback for production

* restored some code from Gemfile

* Restored db settings

* Restored db settings

* Include sqlite for production in the docker image build

* Updated script for building image

* Updated script for building image

* Updated script for building image
This commit is contained in:
Jesus Federico 2019-05-22 12:03:06 -04:00 committed by GitHub
parent 7dfab1482d
commit be84e7e4ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -13,9 +13,6 @@ gem 'rails', '~> 5.0.7'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SQLite as the primary database.
gem 'sqlite3', '~> 1.3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
@ -89,6 +86,8 @@ group :development, :test do
gem 'byebug', platform: :mri
# Environment configuration.
gem 'dotenv-rails'
# Use a sqlite database in test and development.
gem 'sqlite3', '~> 1.3'
end
group :test do

View File

@ -25,7 +25,7 @@ Rails.application.configure do
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
config.assets.compile = true
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb

View File

@ -53,11 +53,13 @@ if [ -z $CD_DOCKER_REPO ]; then
export CD_DOCKER_REPO=$CD_REF_SLUG
fi
if [ "$CD_REF_NAME" != "master" ] && [[ "$CD_REF_NAME" != *"release"* ]] && ( -z $CD_BUILD_ALL ] || [ "$CD_BUILD_ALL" != "true" ] ); then
if [ "$CD_REF_NAME" != "master" ] && [[ "$CD_REF_NAME" != *"release"* ]] && ( [ -z "$CD_BUILD_ALL" ] || [ "$CD_BUILD_ALL" != "true" ] ); then
echo "#### Docker image for $CD_REF_SLUG won't be built"
exit 0
fi
# Include sqlite for production
sed -i "/^group :production do/a\ \ gem 'sqlite3', '~> 1.3'" Gemfile
# Set the version tag when it is a release or the commit sha was included.
if [[ "$CD_REF_NAME" == *"release"* ]]; then
sed -i "s/VERSION =.*/VERSION = \"${CD_REF_NAME:8}\"/g" config/initializers/version.rb