https://github.com/dimonets/github-actions-example-nodejs
Example CI/CD workflow implementation for NodeJS app using GitHub Actions (support AWS ECS and Azure ACI).
https://github.com/dimonets/github-actions-example-nodejs
aws-ecs aws-ecs-fargate azure azure-aci cicd github-actions nodejs
Last synced: about 2 months ago
JSON representation
Example CI/CD workflow implementation for NodeJS app using GitHub Actions (support AWS ECS and Azure ACI).
- Host: GitHub
- URL: https://github.com/dimonets/github-actions-example-nodejs
- Owner: dimonets
- Created: 2024-08-17T23:27:44.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-18T05:27:34.000Z (10 months ago)
- Last Synced: 2024-08-19T00:41:02.124Z (10 months ago)
- Topics: aws-ecs, aws-ecs-fargate, azure, azure-aci, cicd, github-actions, nodejs
- Language: JavaScript
- Homepage:
- Size: 58.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-actions-example-nodejs
Example CI/CD workflow implementation for NodeJS app using GitHub Actions### Build and Test Workflow (CI)
More info: https://dev.to/olumidenwosu/implementing-continuous-integration-for-nodejs-apps-with-github-actions-1ag2
### Deploy to AWS ECS Fargate Workflow (CD)
More info: https://medium.com/@enelakuffo/deploying-a-node-js-application-to-aws-ecs-fargate-with-github-actions-8a350616b979Note:
1. Make sure to setup actions repository secrets in GitHub project for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
2. Make sure security group has inboud rule to allow traffic on 80 and outbound rule to allow traffic to 587 (for ECR access)
3. Make sure task execution role has correct policies:```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecr:GetAuthorizationToken",
"ecr:BatchCheckLayerAvailability",
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "*"
}
]
}
```Live URL: [find in AWS console]

### Deploy to Azure ACI Workflow (CD)
More info: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-github-action#code-try-0Note:
1. Make sure to setup actions repository secrets in GitHub project for AZURE_CREDENTIALS, REGISTRY_LOGIN_SERVER, REGISTRY_USERNAME, REGISTRY_PASSWORD and RESOURCE_GROUP
2. Only ports 80 and 443 can be used with ACILive URL: [find in Azure portal]
