Skip to content
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 Windows compatibility and Docker setup; Upgraded README.md file #307

Closed
wants to merge 4 commits into from

Conversation

yeskiy
Copy link

@yeskiy yeskiy commented Feb 5, 2024

Resolves #306; Add Windows compatibility and Docker setup Upgraded README.md file

Added support for Windows system by including different versions of dependencies in Gemfile. Also introduced Docker setup to the project via a docker-compose file for easy setup and environment consistency. Files for Windows-specific development workflow and a Docker setup guide were also added to the README. Lastly, a .gitignore update included to ignore files from JetBrains products and Docker's PostgreSQL volume data.

…r setup Upgraded README.md file

Added support for Windows system by including different versions of dependencies in Gemfile. Also introduced Docker setup to the project via a docker-compose file for easy setup and environment consistency. Files for Windows-specific development workflow and a Docker setup guide were also added to the README. Lastly, a .gitignore update included to ignore files from JetBrains products and Docker's PostgreSQL volume data.
@yeskiy yeskiy changed the title Add Windows compatibility and Docker setup Upgraded README.md file Add Windows compatibility and Docker setup; Upgraded README.md file Feb 5, 2024
@robzolkos
Copy link
Contributor

I'm concerned at the complexity this is introducing (and potential maintenance burden). But having everyone being able to contribute is also important.

I think this addresses the segment of "windows users who use jetbrains ide's" but unsure if this is worthy of introducing a third way (after wsl/*nix and devcontainer support). (devcontainer can run on the command line and doesn't require an IDE, you can use whatever ide/code editor you like).

Is there a away this could be addressed for those that prefer this combo (and would be used to the setup challenges it has) with a readme/wiki entry?

@yeskiy
Copy link
Author

yeskiy commented Feb 5, 2024

Hey @robzolkos !
So the files that directly related to the windows developing process are bin/dev.ps1 and Procfile.windows.dev which are additional replacement files for adding an ability to run project as previously intended in the documentation. As a JetBrains user, I can run devcontainer and even run the whole project without these changes. So the answer to the question:

Is there a away this could be addressed for those that prefer this combo (and would be used to the setup challenges it has) with a readme/wiki entry?

Is definitially yes. But if you are talking about changes inside Gemfile.lock, here is no way omitting of changing this file (maybe just not staging it, which is not really technically correct).

@robzolkos
Copy link
Contributor

No I agree the Gemfile lock changes should be there to allow installing gems on windows.

A couple more questions:

1/ For clarity - this is for peeps not using WSL correct?
2/ Is there a way we can not introduce a second docker-compose.yml file (there is one already in .devcontainer folder). I'm thinking being able to run docker-compose -f .devcontainer/docker-compose.yml start db (or similar).

@yeskiy
Copy link
Author

yeskiy commented Feb 5, 2024

1/ For clarity - this is for peeps not using WSL correct?

Yep.

2/ Is there a way we can not introduce a second docker-compose.yml file (there is one already in .devcontainer folder). I'm thinking being able to run docker-compose -f .devcontainer/docker-compose.yml start db (or similar).

Second docker-compose file is really ambiguous, you're totally right! I did second one since devcontainer one use latest tag, and I was wanted to test if I will get any problems with 16th version specifically.

@robzolkos
Copy link
Contributor

I was wanted to test if I will get any problems with 16th version specifically

We can update the docker-compose.yml file in the .devcontainers folder with image: "postgres:${POSTGRES_VERSION:-latest}" and it will use the latest if a specific version is not provided.

That clears up the need to have another docker-compose file introduced. The remaining changes are ok and won't be a maintenance nightmare going forward I don't think. (aside: I don't use Windows but its surprising to me that windows needs all this extra cruft - I think most rails development happens in WSL nowadays).

@zachgoll
Copy link
Collaborator

zachgoll commented Feb 5, 2024

Hey @yeskiy, thanks for the setup here, I'm definitely in favor of making it easy for Windows devs to contribute.

Per @robzolkos comments, I'm a little worried that we're adding too many options for getting the project started this early on. Just curious, is not using WSL just a personal preference? Or did you run into some issues with it?

…mpose

The root-level docker-compose.yaml file has been deleted as it was redundant. The docker-compose file within the .devcontainer directory has been updated to allow for specific versioning of the Redis and Postgres images.
@yeskiy
Copy link
Author

yeskiy commented Feb 6, 2024

Hey @zachgoll!
Yep, I can enjoy using WSL itself, but devil in the details here. JetBrains have “Beta” support of devcotainer (in real world, it is almost unusable when you try to develop something, a lot of bugs are still presented).
I personally don't use VS Code for developing, only for small stuff.

P.S. @robzolkos did your requested change related to docker-compose.yaml in root folder

@zachgoll
Copy link
Collaborator

zachgoll commented Feb 6, 2024

Hey @yeskiy, I've opened a PR that addresses various setup related issues - #339

I also created a guide for getting started with Windows development. Ultimately, we'd like to stick with WSL as our recommendation for building with Windows since that closely mirrors our production environment and is what we think is the most common ways to run a Rails app on Windows. Would you mind taking a read through that guide and letting me know if/where you get stuck?

@zachgoll
Copy link
Collaborator

zachgoll commented Feb 7, 2024

Closing this out as we now have a Windows Setup guide and updated README for local dev:

https://github.com/maybe-finance/maybe/wiki/Windows-Dev-Setup-Guide

To keep things simple for new contributors, we're recommending the WSL approach to running on Windows. If any updates need to be made to the existing guide just let me know here in a comment and I'll get them added!

@zachgoll zachgoll closed this Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows develop support
3 participants