rubyforgood / human-essentials

Human Essentials is an inventory management system for diaper, incontinence, and period-supply banks. It supports them in distributing to partners, tracking inventory, and reporting stats and analytics.
https://humanessentials.app
MIT License
446 stars 473 forks source link

Experiment with Code Spaces and related tooling #3829

Closed awwaiid closed 1 month ago

awwaiid commented 1 year ago

We try to make it as easy as possible to contribute to the project. One of the current tools to explore are Github codespaces, along with docker/docker-compose to make this easy. This ticket is to track research and experimentation around this.

github-actions[bot] commented 1 year ago

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] commented 1 year ago

Automatically unassigned after 7 days of inactivity.

aeisenberg commented 5 months ago

Hi, I have some experience with codespaces. I would like to contribute a devcontainer that will help new users get started.

dorner commented 5 months ago

@aeisenberg give it a shot!

aeisenberg commented 5 months ago

Thanks. I'm giving it a shot and I have something that I think works. With my change, you can create a codespace and after initialization completes, you have the correct ruby version installed, postgres available, and rails setup. All you need to do is call bin/start.

The downside is that there are no pre-built docker images for Ruby 3.2.2 right now since the latest is 3.2.3. This means that before the container can be initialized, we must download and compile 3.2.2. This takes a while. I'll put up what I have after I clean it up a bit, but I'd like some guidance on how to make this better.

aeisenberg commented 5 months ago

I spoke too soon (or typed too soon). I found an image that provides 3.2.2 by default. This significantly speeds up the codespace startup. However, when you move to a new version of ruby, we'll need to update the image as well. I'll put that in the README.

aeisenberg commented 5 months ago

PR created. I hope this will be useful for you. I wanted to work on this because when I tried to set up the project myself, I had trouble getting the dev environment correct. With this change, it should be one-click to get a working environment (though it will take a little time).

When the ruby version changes, it would be nice (but not necessary) to also update the docker image.

github-actions[bot] commented 5 months ago

Automatically unassigned after 7 days of inactivity.

aeisenberg commented 5 months ago

I'm still working on this and getting feedback on #4292. Can someone reassign me?

github-actions[bot] commented 4 months ago

Automatically unassigned after 7 days of inactivity.

aeisenberg commented 4 months ago

Still working on this. 😄 Can you reassign?

cielf commented 4 months ago

Done.

github-actions[bot] commented 4 months ago

Automatically unassigned after 7 days of inactivity.

aeisenberg commented 4 months ago

Will be fixed by https://github.com/rubyforgood/human-essentials/pull/4353

lsfernandes92 commented 4 months ago

Hello there! It's great to see the improvements in action. I managed to run the project within the codespace environment. Kudos to @aeisenberg and @awwaiid for the accessibility enhancements! 👏

I'm here because last week (before those codespace changes), I was going through the documentation and trying to set up the project locally to contribute. At that time, the only method I found was to manually install Ruby and Postgres, along with all the required libraries, Bundler, rbenv/rvm, XCode's command line tools, homebrew, etc...

However, I managed to containerize the project to run with Docker Compose. This provides another convenient way to contribute, as it allows setting up and running the application without any environment configuration. The only requirements are Docker and Docker Compose installed on your machine.

That being said, do you still think it's worth Dockerizing the project? If that's the case, can I work on it?

dorner commented 4 months ago

Heh... this is a perennial request. We've had it before and actually removed it.

For some more history and context, see https://github.com/rubyforgood/human-essentials/pull/3781#issuecomment-1986459292 and more importantly https://github.com/rubyforgood/human-essentials/issues/1856#issuecomment-695344747 .

@awwaiid is this issue OK to close since we merged the codespaces stuff?