File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ RUN apt-get update && apt-get -y install iproute2 curl jq libgmp3-dev ruby-dev b
14
14
rm -rvf /root/* /root/.gem* /var/cache/*
15
15
16
16
COPY . /usr/src/app
17
- RUN chmod +x /usr/src/app/startup.sh
17
+ RUN chmod +x /usr/src/app/startup-cdk .sh
18
18
19
19
# helpful when trying to update gems -> bundle update, remove the Gemfile.lock, start ruby
20
20
# RUN bundle update
@@ -23,4 +23,4 @@ RUN chmod +x /usr/src/app/startup.sh
23
23
HEALTHCHECK --interval=10s --timeout=3s \
24
24
CMD curl -f -s http://localhost:3000/health/ || exit 1
25
25
EXPOSE 3000
26
- ENTRYPOINT ["bash" ,"/usr/src/app/startup.sh" ]
26
+ ENTRYPOINT ["bash" ,"/usr/src/app/startup-cdk .sh" ]
Original file line number Diff line number Diff line change @@ -84,7 +84,10 @@ if [[ -z ${zone} ]]; then
84
84
declare -a subnets=( $( aws ec2 describe-subnets | jq .Subnets[].CidrBlock| sed ' :a;N;$!ba;s/\n/ /g' ) )
85
85
for sub in " ${subnets[@]} " ; do
86
86
if $( ruby -e " puts(IPAddr.new($sub .to_s).include? $ip_addr .to_s)" ) == ' true' ; then
87
- zone=$( aws ec2 describe-subnets | jq -r " .Subnets[] | select(.CidrBlock==$sub ) | .AvailabilityZone" | grep -o .$)
87
+ details=$( aws ec2 describe-subnets | jq -r " .Subnets[] | select(.CidrBlock==$sub )" )
88
+ if [[ $( echo $details | jq .Tags) != " null" ]]; then
89
+ zone=$( echo $details | jq -r ' select(.Tags[].Value=="ecsworkshop") | .AvailabilityZone' | sort -u | grep -o .$)
90
+ fi
88
91
fi
89
92
done
90
93
fi
You can’t perform that action at this time.
0 commit comments