Hey with this guide and repository you should be able to build a Rails application on docker but also using redis, foreman, webpack dev server and also imagemagick(currently only avaiblable on ruby alpine dockerfile)
docker-compose run --no-deps web rails new . --force --database=postgresql
sudo chown -R $USER:$USER .
host: <%= ENV["DATABASE_HOST"] %>
username: <%= ENV["DATABASE_USERNAME"] %>
password: <%= ENV["DATABASE_PASSWORD] ">
foreman
sidekiq
redis
docker-compose build web
docker-compose run --rm web rails db:create db:migrate
docker-compose up --build web
we need to set production database.yml to our default conf or use a configuration of your preference
production:
<<: *default
database: myapp_production
docker-compose -f docker-compose.prod.yml build #you can also build both separate
docker-compose -f docker-compose.prod.yml up -d
docker-compose -f docker-compose.prod.yml up -d --build #also you should skip -d flag to get logs of your container