Skip to content

Commit 4f3499b

Browse files
committed
updated ports, settings and readme
1 parent 46342a3 commit 4f3499b

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

.aws/ecs-task-definition.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"cpu": 256,
1010
"portMappings": [
1111
{
12-
"containerPort": 8080,
13-
"hostPort": 8080
12+
"containerPort": 80,
13+
"hostPort": 80
1414
}
1515
],
1616
"essential": true

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Following the guide: https://medium.com/@enelakuffo/deploying-a-node-js-applicat
1111

1212
Note:
1313
1. Make sure to setup actions repository secrets in GitHub project for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
14-
2. Make sure security group has inboud rule to allow traffic on 8080 and outbound rule to allow traffic to 587 (for ECR access)
14+
2. Make sure security group has inboud rule to allow traffic on 80 and outbound rule to allow traffic to 587 (for ECR access)
1515
3. Make sure task execution role has correct policies:
1616

1717
```
@@ -34,6 +34,17 @@ Note:
3434
}
3535
```
3636

37-
Live URL: http://ip:8080/hello
37+
Live URL: http://ip-address
3838

39-
![Deploy to AWS ECS Fargate Workflow](https://github.com/dimonets/github-actions-example-nodejs/actions/workflows/deploy-aws-ecs-fargate.yml/badge.svg)
39+
![Deploy to AWS ECS Fargate Workflow](https://github.com/dimonets/github-actions-example-nodejs/actions/workflows/deploy-aws-ecs-fargate.yml/badge.svg)
40+
41+
### Deploy to Azure ACI Workflow (CD)
42+
Following the guide: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-github-action#code-try-0
43+
44+
Note:
45+
1. Make sure to setup actions repository secrets in GitHub project for AZURE_CREDENTIALS, REGISTRY_LOGIN_SERVER, REGISTRY_USERNAME, REGISTRY_PASSWORD and RESOURCE_GROUP
46+
2. Only ports 80 and 587 can be used with ACI
47+
48+
Live URL: http://ip-address
49+
50+
![Deploy to Azure ACI Workflow](https://github.com/dimonets/github-actions-example-nodejs/actions/workflows/deploy-azure-aci.yml/badge.svg)

src/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const express = require('express');
33

44
// App
55
const app = express();
6-
app.get('/hello', (req, res) => {
6+
app.get('/', (req, res) => {
77
res.status(200).json({
88
message: "Hello World!"
99
});

src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const { app } = require('./app');
22

3-
//const PORT = 8080;
43
const PORT = 80;
54
app.listen(PORT, () => {
65
console.log(`Running on http://localhost:${PORT}`);

src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const request = require('supertest');
22
const { app } = require('./app');
33

4-
describe('/hello', () => {
4+
describe('/', () => {
55
it('returns `Hello World!`', async () => {
66
const data = await request(app).get('/hello');
77
expect(data.statusCode).toBe(200);

0 commit comments

Comments
 (0)