Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

Dockerize Rails project with postgres and redis

$
0
0

Am new to RoR and I want to dockerize a Rails app with Redis and Postgres running in 3 different containers.

I now have a simple rails project running inside a container

How would I configure the RoR project to do the following:

  1. How to connect Rails with Postgres?

  2. How to setup Redis with Rails as a simple in-memory data store and access it?

Thanks :)

docker-compose.yml

version: '3'services:   rails:     build: .    volumes:      - ./:/app    ports:      - 3000:3000  postgres:    image: postgres  redis:    image: redis

EDIT:

Changed sqlite db to postgres


Viewing all articles
Browse latest Browse all 873

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>