Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to SQLite and auto-migrating and auto-seeding on container startup #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.6.3
FROM ruby:2.7.1

# Install apt based dependencies required to run Rails as
# well as RubyGems. As the Ruby image itself is based on a
Expand Down Expand Up @@ -29,9 +29,13 @@ EXPOSE 3000

# Configure an entry point, so we don't need to specify
# "bundle exec" for each of our commands.
ENTRYPOINT ["bundle", "exec"]
# ENTRYPOINT ["bundle", "exec"]

# The main command to run when the container starts. Also
# tell the Rails dev server to bind to all interfaces by
# default.
CMD ["rails", "server", "-b", "0.0.0.0"]
# CMD ["rails", "server", "-b", "0.0.0.0"]

# ENV RAILS_ENV=production
# CMD rails db:migrate && rails db:seed && rails s
CMD bundle exec rake db:migrate && bundle exec rake db:seed && bundle exec puma -C config/puma.rb
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.6.3'
ruby '2.7.1'

gem 'puma', '~> 3.11' # Use Puma as the app server
gem 'rails', '~> 5.2.3' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
Expand All @@ -30,7 +30,8 @@ gem 'leaflet-awesome-markers-rails', '~> 2.0'
# Custom markers for Leaflet

gem 'leaflet-rails' # Handles Leaflet-based maps
gem 'pg' # Use Postgres
# gem 'pg' # Use Postgres
gem 'sqlite3'
gem 'geokit-rails' # Provides geolocation-based searches

group :development, :test do
Expand Down
Loading