-
Notifications
You must be signed in to change notification settings - Fork 17
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
dockerize gocongress #266
dockerize gocongress #266
Conversation
Updated .gitignore for database.yml.
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.
Hi Michael, thanks for presenting this. It's interesting to me because I have heard of people dockerizing Rails apps before, but have never seen it done. My only experience with Docker has been using GH Actions for CI.
I assume the goal here is to simplify developer setup.
In the spirit of keeping an open mind, I'll phrase my worries as questions. 😄
- Do we anticipate any situations where dev or troubleshooting will be harder because of the extra layer? Does it take longer to start the app, or to run a single test? Can we still use traditional troubleshooting tools, like grepping the postgres logs, or using our chosen ruby debugger,
byebug
? - Our current dev setup is well documented and we've had a dozen people contribute code over the years. That's pretty good for a small org like us! Have we heard anyone say that they'd like to contribute but the setup was too difficult, even with help?
- Certain changes, like removing
database.yml
from.gitignore
will make it difficult to do development without Docker. Do you think it's possible to support both development models going forward?
Are there any other trade-offs I'm missing?
I didn't have a chance to check this out at the end of the holiday weekend while I was spending time with family, but I'm looking forward to looking at this tonight. Thanks for your work, @EarthSchlange! |
Since this is entirely configured to use Docker, there may be some issues with the initial configuration of Docker and Docker Compose. Especially, if one is not familiar with Docker or containers.
No. Well once the app has go through the build steps everything gets cached unless the
I added a PostgresSQL configuration to the There is a caveat with running
I think @neagle would know more about this. I just saw #172, and I took a shot a resolving it because often a container development setup can help encapsulate some of the steps and eliminate the need to install other software and configure a database and run the server. Thus, making getting started a little easier. New developers would then be able to get started by installing Docker and running
Probably, but in my opinion this goes against any benefit we get from encapsulating things with Docker Compose. For example, hiding the build commands i.e., bundler install or the ruby installation or rails server or database configuration. |
I'm glad this discussion is happening. When I created #172, I was the only one doing any of current development on the Go Congress website. I created the issue mostly as a placeholder—you may note that I didn't even put in any description text. From my perspective, the goal was to simplify the setup for developers and to reduce the number of external dependencies that must be individually installed on one's system. When there are external dependencies, my biggest concern is conflicts between projects. Ruby has On the other hand, we recently removed our main project at work from Docker containers for development, because it was annoyingly slow. We kept mongo itself in a Docker image, but now run the node processes for the back end and front end on their own. There's an equivalent to
I'd certainly prefer to have as thorough a discussion as we can about the pros and cons of the two approaches, and then stick with one development model. Right now we have the very, very welcome problem of two other highly knowledgeable and motivated people involved in the project and I definitely want to do our best to coordinate things so we all can have the best experience possible. |
The benefit of using Docker is that we have the ability to essentially hide several of the build layers, installation processes and complexity of getting started. We will be keeping our development environment cleaner and more understandable by using Docker. That is to say, we are defining the our expected environments from within I don't think keeping two environments (Native Ruby and Docker) is a good idea because could potentially introduce different issues do only to the environment we are running. We would lose some of the benefit of having an development / test environment defined in code, and we are introducing an extra step for incoming developers (copying database.example.yml to database.yml) which can introduce human error. The downside of doing this is we cannot skip in between layers easily if there is a problem. For example, we cannot simply run |
Thanks Michael for the explanations.
My technique, when updating gems, is to update one at a time, ie. one
Not counting time running tests, each iteration of this loop takes about 15s for most gems. What would a similar procedure look like in Docker? Would it be as fast (15s/gem+commit)? Would we have to rebuild the container each time?
It's great that you found a way to use byebug, but this sounds less convenient that what we currently have. Are there different ruby debuggers that are easier to use with Docker? |
Summary
Adds docker-compose and docker instructions for developing the Go Congress web application.
Resolves #172
Changes