-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rails Docker Compose example #1
base: main
Are you sure you want to change the base?
Conversation
bcae1c7
to
4290e61
Compare
4290e61
to
886490d
Compare
docker-compose-rails/.env-vars
Outdated
@@ -0,0 +1 @@ | |||
POSTGRES_PASSWORD="really-good-password" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the best
@CodySanders This is awesome! 👏 Kind of a nit thing - for naming consistency could you change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I had a few suggestions/comments for learning purposes to make this easier to digest for someone completely new to Docker. Thanks for adding this!
@@ -8,7 +8,6 @@ | |||
- Add node.js Express / PostgreSQL example | |||
- Add React (CRA) example | |||
- Add React (Next.js) example | |||
- Add Rails example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a link to the rails example to line 4 of the readme? Also could we move the rails example to ./example-rails/
?
docker-compose-rails/Dockerfile
Outdated
FROM ruby:3.0.1 | ||
|
||
RUN apt update -qq && apt install -y nodejs npm postgresql-client | ||
RUN npm install --global yarn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is meant to be a tutorial of sorts, would you be up for adding some comments for what the various lines do? I went this direction in the php example - what do you think? I know it's verbose but for someone totally new to Docker, it would be helpful to have a line-by-line explanation.
@@ -0,0 +1,18 @@ | |||
services: | |||
db: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be up for adding line-by-line comments/instructions to the docker compose file? I went with this approach here and it seemed to be good for learning purposes. Let me know what you think!
@townofdon I think I addressed all of the suggestions but let me know if I missed anything. I think the comments are certainly helpful but it would also be my hope that this project would be a jumping off point for a discussion with someone who is looking to get into Docker and using it in their development process. There are still many small nuances that aren't covered in detail here but I think it could be a good start. |
Also, if you pull this down and try to run it please let me know if you run into any issues. I think I remembered to include everything needed but there is always the chance that my machine already had a forgotten dependency included that a new machine would not |
@CodySanders Awesome, thanks for adding those comments! I agree that the documentation is needed for understanding the nuances and anyone looking to deep-dive into Docker, but the comments definitely help and especially add context. I checked out the branch and ran However running the db:create and db:migrate scripts resulted in an err: I saw that POSTGRES_PASSWORD is in .env-vars, maybe another env var is needed? |
Hmm, I will take a look at that. If the |
No description provided.