This is a simple example of how to implement a CI CD pipeline using Github actions, Docker, and GitHub.
- Terraform
- Docker
- GitHub account
- aws account
-
Run the terrafrom code located in the
moount_stagin
directory to create the necessary infrastructure on AWS. -
Launch the sonarqube container using the docker-compose file located in the
sonar_qube
directory. -
Set the value for the following secrets in the GitHub repository settings:
DOCKER_PASSWORD
= password for docker hubDOCKER_USERNAME
= username for docker hubEC2_HOST
= public ip of the ec2 instanceEC2_USERNAME
= username for the ec2 instanceSONAR_HOST_URL
= public ip of the instance running sonarqubeSONAR_TOKEN
= token for sonarqubeSSH_PRIVATE_KEY
= this is generated by the terraform code and is used to connect to the ec2 instance