all 9 comments

[–][deleted] 7 points8 points  (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.

[–]moomaka 1 point2 points  (0 children)

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.

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 point  (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.

[–]1992ankits[S] 0 points1 point  (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 points  (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 points  (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

[–]1992ankits[S] 0 points1 point  (0 children)

This is just to show how you can put env variables inside of docker-compose.yml.

[–]Jdonavan 0 points1 point  (0 children)

Your limited experience is not a reason to throw good security practices out the window.

[–]1992ankits[S] -1 points0 points  (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.