cuhacking / 2025

Flagship platform for cuHacking's 2025 hackathon.
9 stars 8 forks source link

build: containerize monorepo #66

Open JowiAoun opened 2 months ago

JowiAoun commented 2 months ago

Problem Statement We have had instances where the following would happen:

  1. Dependencies might have been installed globally for a team member, but not for another πŸ“¦
  2. Dependencies could be on different version throughout environments πŸ“š
  3. Path variables were installed on one computer, but not the other πŸ›£οΈ
  4. Deployments would fail because they are different environments than the deployer's machine πŸ’»
  5. Different operating systems & file systems may affect development down the line πŸ‘Ž

Many more problems will happen if we proceed the way we do, down to the operating system. This has many solutions to it, and one way is to use Docker and containerize our apps. Best explained by Docker on their website: "Package Software into Standardized Units for Development, Shipment and Deployment". Basically, containerizing our app means that Docker will spin up containers (containing our frontend/backend/databases/etc), in environments that will be the exact same, wherever created. This includes on the cloud!

This helps resolve the stale resolution "Well, it works on my machine".

Goals

  1. Review previous docker-compose.yml file in the monorepo, and see it's current state now
  2. Research @nx-tools/nx-container
  3. Containerize the monorepo, meaning each app individually. Can be generated with the above plugin
  4. Attempt deployment by hand to AWS Fargate/ECS

Out of Scope This will not include setting up the infrastructure code for the deployment. This will need to be done within issue #41.

Solution Summary

Solution The solution is to have dev/prod/test environments that will require minimal steps, run without a problem, and run anywhere.

HasithDeAlwis commented 2 months ago

Is it in scope for this Issue to setup a docker-publish.yml file to push to dockerhub? I don't know if we want to do this after we decided how we'll organize our actions folder, but it should be simple from what I can tell from reading some documentation.

HasithDeAlwis commented 2 weeks ago

Please write a comment to update us on the status of this @JowiAoun?

JowiAoun commented 2 weeks ago

Please write a comment to update us on the status of this @JowiAoun?

This is not a topic of focus right now. It will be needed in the future if we decide to deploy to OpenStack instances. I will change it as a nice to have for now, if any external contributors would like to work on this issue.