Insert bullets description of the project if available.
Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.
Contributing | Built with | Repos and projects | Deployment | Feedback | License | About Code for Romania
This project is built by amazing volunteers and you can be one of them! Here's a list of ways in which you can contribute to this project. If you want to make any change to this repository, please make a fork first.
Help us out by testing this project in the staging environment. If you see something that doesn't quite work the way you expect it to, open an Issue. Make sure to describe what you expect to happen and what is actually happening in detail.
If you would like to suggest new functionality, open an Issue and mark it as a [Feature request]. Please be specific about why you think this functionality will be of use. If you can, please include some visual description of what you would like the UI to look like, if you are suggesting new UI elements.
React / NestJS
Javascript / Typescript
Web
React
NPM
Postgres in AWS RDS
The deployment process requires to understand the infrastructure orchestration.
The following are the involved parts:
When a new deployment is needed, there is a flow of events to understand:
A git push
or git tag
to the develop / main
branch will trigger the Github Action (1) to:
π§ Note: We want to tag a commit in order to have a tagged image in ECR to be picker later. Check the existing tags and use a new one (e.g. 0.1.5)
Once the Docker Image is available in ECR, we can instruct ECS to pick the new image to replace the current. We do this, by navigating to locals.tf in the terraform-ngohub repository and update the backend tag
with the new, fresh one.
backend = {
domain = "api${local.env_suffix}.${var.root_domain}"
image = {
repo = data.aws_ecr_repository.ngohub_backend.repository_url
tag = "1.0.14" -> "1.0.15" // π Update 1.0.14 to 1.0.15
}
}
π§ There are 2 important triggers on the Terraform Repository (4) ran by Terraform Cloud (5):
terraform plan
- will be visibile in the PR, and will display the infrastructure changes.
staging
environmentproduction
environmentterraform apply
- will make the infrastructure changes as described in the plan.
staging
production
π In the end, we want to apply the changes (close the PR) so a new ECS Task Definition will be created using the new image with the new tag
we updated and the ECS Service will replace the old task definition with the new one, ensuring zero downtime deployment.
β DO NOT try to push changes directly to develop/main. The branches are protected.
terraform plan
is working as expectedmain
branch to deploy into production
.This project is licensed under the MPL 2.0 License - see the LICENSE file for details
Started in 2016, Code for Romania is a civic tech NGO, official member of the Code for All network. We have a community of around 2.000 volunteers (developers, ux/ui, communications, data scientists, graphic designers, devops, it security and more) who work pro-bono for developing digital solutions to solve social problems. #techforsocialgood. If you want to learn more details about our projects visit our site or if you want to talk to one of our staff members, please e-mail us at contact@code4.ro.
Last, but not least, we rely on donations to ensure the infrastructure, logistics and management of our community that is widely spread across 11 timezones, coding for social change to make Romania and the world a better place. If you want to support us, you can do it here.