Skip to content

Commit

Permalink
Set up Redis so it works in dev environment. [#3]
Browse files Browse the repository at this point in the history
  • Loading branch information
marnen committed Apr 3, 2020
1 parent 2b91daa commit 2d1e465
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ gem 'bootsnap', '>= 1.4.2', require: false
gem "haml-rails", "~> 2.0"
gem 'faraday', '~> 1.0.1'
gem 'moneta'
gem 'redis'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ GEM
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.1.3)
regexp_parser (1.7.0)
rspec (3.9.0)
rspec-core (~> 3.9.0)
Expand Down Expand Up @@ -322,6 +323,7 @@ DEPENDENCIES
moneta
puma (~> 4.1)
rails (~> 6.0.2, >= 6.0.2.2)
redis
rspec-rails (~> 4.0.0)
sass-rails (>= 6)
spring
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
web:
environment:
PORT: 3000
REDIS_URL: "redis://cache:6379"
build: .
command: bundle exec rails s
volumes:
Expand All @@ -16,5 +17,7 @@ services:
command: ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]
cache:
image: redis:5.0.8-alpine
expose: ["6379"]
networks: [internal]
volumes:
bundle: # see https://dev.to/k_penguin_sato/cache-rails-gems-using-docker-compose-3o3f

0 comments on commit 2d1e465

Please sign in to comment.