Skip to content

Commit c1fae3d

Browse files
committed
Fixed security group
1 parent 950c118 commit c1fae3d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

CF_spring_cloud_aws_sample.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,12 @@ Resources:
9292
GroupDescription: Security Group for Spring server
9393
SecurityGroupIngress:
9494
- IpProtocol: tcp
95-
FromPort: 8080
96-
ToPort: 8080
95+
FromPort: 22
96+
ToPort: 22
97+
CidrIp: 0.0.0.0/0
98+
- IpProtocol: tcp
99+
FromPort: 80
100+
ToPort: 80
97101
CidrIp: 0.0.0.0/0
98102

99103
S3bucket:
@@ -119,6 +123,7 @@ Resources:
119123

120124
SpringCloudAwsEC2Instance:
121125
Type: AWS::EC2::Instance
126+
DependsOn: SpringCloudAwsRDS
122127
Metadata:
123128
Comment: Spring Using AWS services
124129
AWS::CloudFormation::Init:
@@ -202,7 +207,7 @@ Resources:
202207
/usr/local/bin/installSoftware.sh || { echo "Error installing software"; exit 1; }
203208

204209
# Run App
205-
docker run -e PROG_OPTS='--spring.profiles.active=prod' -p 80:8080 codeurjc/spring-cloud-aws-sample:latest
210+
docker run -d -e PROG_OPTS='--spring.profiles.active=prod' -p 80:8080 codeurjc/spring-cloud-aws-sample:latest
206211

207212
/usr/local/bin/check_app_ready.sh || { echo "Error installing software"; exit 1; }
208213

0 commit comments

Comments
 (0)