Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 13 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,47 +1,40 @@
FROM ruby:2.1
# Use Ruby 2.6 (Debian Bullseye-based)
FROM ruby:2.6

LABEL maintainer="[email protected]"

# Fix expired Jessie APT sources (remove jessie-updates, use archive mirrors)
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list && \
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list && \
sed -i 's|http://security.debian.org|http://archive.debian.org/debian-security|g' /etc/apt/sources.list && \
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99disable-valid-until && \
echo 'Acquire::AllowInsecureRepositories "true";' >> /etc/apt/apt.conf.d/99disable-valid-until && \
echo 'APT::Get::AllowUnauthenticated "true";' >> /etc/apt/apt.conf.d/99disable-valid-until

# Install packages (ignore expired keys and unauthenticated packages)
RUN apt-get update -o Acquire::Check-Valid-Until=false && \
apt-get install -y --allow-unauthenticated \
# Install required system packages
RUN apt-get update && \
apt-get install -y \
nodejs \
sqlite3 \
libsqlite3-dev \
libmysqlclient-dev \
libmariadb-dev \
libpq-dev \
tzdata \
git \
curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Install Bundler compatible with Rails 3
# Install Bundler compatible with Rails 3/4
RUN gem install bundler -v '~> 1.17'

# Set app directory
# Set the working directory inside the container
WORKDIR /app

# Copy Gemfile first to cache layers
# Copy Gemfile and lockfile first for better Docker cache performance
COPY Gemfile Gemfile.lock ./

# Install Ruby gems
# Install gems via Bundler
RUN bundle install

# Copy the app code
# Copy the rest of the app source code
COPY . .

# Expose Rails default port
# Expose the default Rails server port
EXPOSE 3000

# Start Rails server
# Start the Rails server on container start
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]

22 changes: 11 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ source 'http://rubygems.org'
# source 'http://gems.github.com'
# source 'http://reduadmin:[email protected]/'

ruby '2.1.10'
ruby '2.6.10'

gem 'aasm'
gem 'premailer-rails'
gem 'classy_enum'
gem 'activerecord-import'
gem 'activerecord-import' # needs ruby 2.4
gem 'acts_as_tree', '~> 0.1.1'
gem 'acts-as-taggable-on', '2.4.1'
gem 'ajaxful_rating',
Expand All @@ -23,7 +23,7 @@ gem 'ckeditor', '3.4.2.pre'
gem 'daemons', '1.0.10'
gem 'date_validator'
gem 'deep_cloneable'
gem 'delayed_job_mongoid'
# gem 'delayed_job_mongoid'
gem 'bson_ext'
gem 'dynamic_form'
gem 'em-http-request'
Expand All @@ -32,7 +32,7 @@ gem 'exceptional'
gem 'factory_girl_rails'
gem "redu-has_friends", "~> 1.0", require: "has_friends"
gem 'invitable', git: 'https://github.com/redu/invitable.git'
gem 'jquery-rails', '>= 1.0.12'
gem 'jquery-rails' #, '>= 1.0.12'
gem 'kaminari', '0.14.1'
gem 'mime-types'
gem "mysql2"
Expand All @@ -41,7 +41,7 @@ gem 'omniauth-facebook'
gem 'pusher'
gem 'pagseguro', '~> 0.1.10'
gem 'paperclip', '~> 2.7.5'
gem 'rails', '~> 3.2.13'
gem 'rails', '~> 4.0'
gem "rake", "~> 10.0.4"
gem 'remotipart', '~> 1.0'
gem 'scribd_fu', git: 'https://github.com/guiocavalcanti/scribd_fu.git',
Expand All @@ -50,12 +50,12 @@ gem 'simple-navigation', '3.10.1'
# gem 'sunspot_rails'
gem 'route_translator'
gem 'useragent'
gem 'vis_client', git: 'https://github.com/redu/vis_client.git',
branch: 'ruby-1-9-3'
# gem 'vis_client', git: 'https://github.com/redu/vis_client.git', # needs rails 3
# branch: 'ruby-1-9-3'
gem 'chronic' # Necessário ao whenever
# gem 'whenever', require: false
gem 'zencoder'
gem 'untied-publisher', '~> 0.0.7.pre3'
# gem 'untied-publisher', '~> 0.0.7.pre3'
gem 'yajl-ruby'
gem 'simple_acts_as_list'
gem 'ey_config'
Expand All @@ -76,19 +76,19 @@ gem 'rack-cors', require: 'rack/cors'
gem 'roar-rails'

group :assets do
gem 'sass-rails', '~> 3.2'
gem 'sass-rails' #, '~> 4.0' # sass-embedded
gem 'compass-rails'
gem 'therubyracer', platforms: :ruby
gem 'uglifier', '~> 2'
gem 'asset_sync'
gem 'turbo-sprockets-rails3'
# gem 'turbo-sprockets-rails3'
end

# Gems específicos de algum ambiente
group :development, :test do
gem 'jasmine'
gem 'no_peeping_toms', git: 'https://github.com/patmaddox/no-peeping-toms.git'
gem 'rails3-generators'
# gem 'rails3-generators'
gem "rspec-rails", "~> 2.13"
# gem 'debugger'
# gem 'sunspot_solr'
Expand Down
Loading
Loading