-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #716 from opengovsg/release-v4.46.1-hotfix
build: merge release 4.46.1 into master
- Loading branch information
Showing
103 changed files
with
5,519 additions
and
3,036 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
################################################################################################### | ||
#### Memory monitoring for Elastic Beanstalk | ||
#### https://medium.com/tomincode/cloudwatch-memory-monitoring-for-elastic-beanstalk-1caa98d57d5c | ||
#### https://aws.amazon.com/premiumsupport/knowledge-center/elastic-beanstalk-memory-monitoring/ | ||
################################################################################################### | ||
|
||
packages: | ||
yum: | ||
perl-DateTime: [] | ||
perl-Sys-Syslog: [] | ||
perl-LWP-Protocol-https: [] | ||
perl-Switch: [] | ||
perl-URI: [] | ||
perl-Bundle-LWP: [] # TODO(#638): Replace this yum package with perl-Digest-SHA.x86_64 for Amazon Linux 2 instances | ||
sources: | ||
/opt/cloudwatch: https://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip | ||
|
||
container_commands: | ||
00download: | ||
command: "wget http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.2.zip" | ||
ignoreErrors: true | ||
01extract: | ||
command: "unzip -o CloudWatchMonitoringScripts-1.2.2.zip" | ||
ignoreErrors: true | ||
02rmzip: | ||
command: "rm CloudWatchMonitoringScripts-1.2.2.zip" | ||
ignoreErrors: true | ||
03prereq: | ||
command: "yum install -y perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https" | ||
ignoreErrors: false | ||
04cdinto: | ||
command: "mv aws-scripts-mon/ /home/ec2-user" | ||
ignoreErrors: true | ||
05cron: | ||
command: "crontab -l | grep -q 'mon-put-instance-data.pl' || crontab -l | { cat; echo '* * * * * /home/ec2-user/aws-scripts-mon/mon-put-instance-data.pl --mem-util --mem-used --mem-avail'; } | crontab -" | ||
ignoreErrors: false | ||
01-setupcron: | ||
command: | | ||
echo '*/5 * * * * root perl /opt/cloudwatch/aws-scripts-mon/mon-put-instance-data.pl `{"Fn::GetOptionSetting" : { "OptionName" : "CloudWatchMetrics", "DefaultValue" : "--mem-util --disk-space-util --disk-path=/" }}` >> /var/log/cwpump.log 2>&1' > /etc/cron.d/cwpump | ||
02-changeperm: | ||
command: chmod 644 /etc/cron.d/cwpump | ||
03-changeperm: | ||
command: chmod u+x /opt/cloudwatch/aws-scripts-mon/mon-put-instance-data.pl | ||
option_settings: | ||
"aws:autoscaling:launchconfiguration" : | ||
IamInstanceProfile : "aws-elasticbeanstalk-ec2-role" | ||
"aws:elasticbeanstalk:customoption" : | ||
CloudWatchMetrics : "--mem-util --mem-used --mem-avail --disk-space-util --disk-space-used --disk-space-avail --disk-path=/ --auto-scaling" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,8 @@ Run the following shell command to build the Docker image from scratch. This wil | |
npm run dev | ||
``` | ||
|
||
After the Docker image has finished building, the application can be accessed at [localhost:5000](localhost:5000). | ||
|
||
If there have been no dependency changes in `package.json` or changes in the | ||
`src/server.ts` file, you can run | ||
|
||
|
@@ -71,6 +73,10 @@ docker-compose up | |
which does **not** rebuild the Docker image from scratch. This command usually | ||
only takes ~15 seconds to finish starting up the image. | ||
|
||
### Accessing email locally | ||
|
||
We use [MailDev](https://github.com/maildev/maildev) to access emails in the development environment. The MailDev UI can be accessed at [localhost:1080](localhost:1080) when the Docker container is running. | ||
|
||
### Environment variables | ||
|
||
Docker-compose looks at various places for environment variables to inject into the containers. | ||
|
@@ -195,7 +201,7 @@ Please contact FormSG ([email protected]) for any details. | |
|
||
## Acknowledgements | ||
|
||
FormSG acknowledges the work done by [Arielle Baldwynn](https://github.com/whitef0x0) to build and maintain [TellForm](https://github.com/tellform), on which FormSG is based. | ||
FormSG acknowledges the work done by [Arielle Baldwynn](https://github.com/whitef0x0) to build and maintain [TellForm](https://github.com/tellform), on which FormSG is based. | ||
|
||
Contributions have also been made by: | ||
[@RyanAngJY](https://github.com/RyanAngJY) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.