Bump Version to Rails 5

This commit is contained in:
Miguel Martinez
2016-08-31 17:52:19 -07:00
parent cc170034b0
commit 83aee7cc24
3 changed files with 9 additions and 6 deletions

View File

@@ -30,14 +30,15 @@ RUN bitnami-pkg install imagemagick-6.7.5-10-3 --checksum 617e85a42c80f58c568f9b
RUN bitnami-pkg install mysql-libraries-10.1.13-0 --checksum 71ca428b619901123493503f8a99ccfa588e5afddd26e0d503a32cca1bc2a389
# Ruby on Rails template
RUN gem install rails -v 4.2.6 --no-document
RUN gem install rails -v 5.0.0.1 --no-document
# Bundle the gems required for a new application
RUN rails new /tmp/temp_app --database mysql --quiet && rm -r /tmp/temp_app
RUN gem install therubyracer
ENV RAILS_ENV=development
ENV BITNAMI_APP_NAME=rails
ENV BITNAMI_IMAGE_VERSION=4.2.6-r4
ENV BITNAMI_IMAGE_VERSION=5.0.0.1-r0
USER bitnami
WORKDIR /app

View File

@@ -6,7 +6,7 @@ services:
myapp:
tty: true # Enables debugging capabilities when attached to this container.
image: bitnami/rails:4.2.6-r3
image: bitnami/rails:5.0.0.1-r0
environment:
- DATABASE_URL=mysql2://mariadb/my_app_development
depends_on:

View File

@@ -32,12 +32,12 @@ wait_for_db() {
setup_db() {
log "Configuring the database"
bundle exec rake db:create
bundle exec rails db:create
}
migrate_db() {
log "Applying database migrations (db:migrate)"
bundle exec rake db:migrate
bundle exec rails db:migrate
}
log () {
@@ -48,6 +48,8 @@ if [ "$1" == "bundle" -a "$2" == "exec" ]; then
if ! app_present; then
log "Creating rails application"
rails new . --skip-bundle --database mysql
# Add rubyracer
sed -i "s/# gem 'therubyracer'/gem 'therubyracer'/" Gemfile
fi
if ! gems_up_to_date; then
@@ -64,7 +66,7 @@ if [ "$1" == "bundle" -a "$2" == "exec" ]; then
echo " App initialization skipped:"
echo " Delete the file $INIT_SEM and restart the container to reinitialize"
echo " You can alternatively run specific commands using docker-compose exec"
echo " e.g docker-compose exec rails bundle exec rake db:migrate"
echo " e.g docker-compose exec rails bundle exec rails db:migrate"
echo " "
echo "#########################################################################"
else