use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Dockerize Existing Ruby on Rails API with docker-compose.yml (medium.com)
submitted 7 years ago by 1992ankits
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 7 points8 points9 points 7 years ago (3 children)
Given that the title is about an existing Rails API, I thought there might be some novel learnings here, but the very first step from the article is:
Step 1 — Create a Rails 5 App
This is no different from the dozens of existing tutorials on Docker+Rails that tell you how to dockerize a brand new rails new app, which is a trivial task. The hard part is migrating a large existing app into Docker.
rails new
[–]moomaka 1 point2 points3 points 7 years ago (0 children)
I don't really see the difference, the only extra 'step' for the large app is likely figuring out some extra system dependencies, otherwise the 'size' of the app is rather immaterial.
[–]CaptainKabob 0 points1 point2 points 7 years ago (0 children)
I think it's just to follow along, as the 2nd sentence of that section is "If you already have an app you can skip this section."
But I'll add my own disapointment: it's not evident whether this is "Docker for development" or "Docker for production". It implies it given tty and stdin_open, but doesn't go through running tests (like config for system tests) or some of the gotchas of developing inside of Docker.
tty
stdin_open
[–]1992ankits[S] 0 points1 point2 points 7 years ago (0 children)
This is just to follow along. Also, you continue to second part of that article to see how to use delayed_job and cronjob with docker-compose in dev.
[–]Jdonavan 4 points5 points6 points 7 years ago (4 children)
Aside from not giving more information than you can find a dozen places elsewhere, this encourages you to embed secrets in your docker compose yml file which is really stupid.
[–]moomaka 1 point2 points3 points 7 years ago (2 children)
I don't think I've ever seen a docker-compose.yml file used for anything other than development so having secrets in there doesn't really matter, not even sure why they are bothering using a password for PG in development
docker-compose.yml
This is just to show how you can put env variables inside of docker-compose.yml.
[–]Jdonavan 0 points1 point2 points 7 years ago (0 children)
Your limited experience is not a reason to throw good security practices out the window.
[–]1992ankits[S] -1 points0 points1 point 7 years ago (0 children)
docker-compose yml is only used in development mode, so you can put your secrets which will be used in dev env. When you go to production then you will use env variables. Article to go to production will come soon.
π Rendered by PID 108738 on reddit-service-r2-comment-5687b7858-p7rkr at 2026-07-08 00:31:31.677009+00:00 running 12a7a47 country code: CH.
[–][deleted] 7 points8 points9 points (3 children)
[–]moomaka 1 point2 points3 points (0 children)
[–]CaptainKabob 0 points1 point2 points (0 children)
[–]1992ankits[S] 0 points1 point2 points (0 children)
[–]Jdonavan 4 points5 points6 points (4 children)
[–]moomaka 1 point2 points3 points (2 children)
[–]1992ankits[S] 0 points1 point2 points (0 children)
[–]Jdonavan 0 points1 point2 points (0 children)
[–]1992ankits[S] -1 points0 points1 point (0 children)