Skip to content

Instantly share code, notes, and snippets.

🌊

Hanh D. TRAN hanhdt

🌊
Block or report user

Report or block hanhdt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hanhdt
hanhdt / xray_on_elastic_beanstalk.config
Created Oct 16, 2018
A sample AWS XRay on Elastic Beanstalk instance
View xray_on_elastic_beanstalk.config
commands:
01-stop-tracing:
command: yum remove -y xray
ignoreErrors: true
02-copy-tracing:
command: curl https://s3.dualstack.us-east-2.amazonaws.com/aws-xray-assets.us-east-2/xray-daemon/aws-xray-daemon-2.x.rpm -o /home/ec2-user/xray.rpm
03-start-tracing:
command: yum install -y /home/ec2-user/xray.rpm
files:
@hanhdt
hanhdt / update_eb_platform.sh
Last active May 12, 2018
Update AWS Elastic Beanstalk Platform Version
View update_eb_platform.sh
# Use AWS CLI (Not EB CLI)
$aws elasticbeanstalk update-environment --solution-stack-name "64bit Amazon Linux 2017.09 v2.7.2 running Ruby 2.5 (Puma)" --environment-name "website-dev" --region "us-west-2"
@hanhdt
hanhdt / 03_elastic_beanstalk_nginx.config
Last active May 8, 2019
Overwriting Nginx config on AWS Elastic Beanstalk
View 03_elastic_beanstalk_nginx.config
files:
"/etc/nginx/conf.d/01_app_server.conf":
mode: "000644"
owner: root
group: root
content: |
# The content of this file is based on the content of /etc/nginx/conf.d/webapp_healthd.conf
upstream website_upstream {
server unix:///var/run/puma/my_app.sock;
}
@hanhdt
hanhdt / 02_yarn_libs.config
Created Apr 21, 2018
Run Yarn install command via AWS Elastic Beanstalk hooks
View 02_yarn_libs.config
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/101_yarn_packages.sh" :
mode: "000775"
owner: root
group: users
content: |
#!/usr/bin/env bash
app="$(/opt/elasticbeanstalk/bin/get-config container -k app_staging_dir)";
# npm install
@hanhdt
hanhdt / 01_elastic_beanstalk_install_packages.config
Last active Feb 11, 2020
Setup additional linux packages on AWS Elastic Beanstalk that need to build Rails 5
View 01_elastic_beanstalk_install_packages.config
# Setup linux packages
option_settings:
- option_name: BUNDLE_DISABLE_SHARED_GEMS
value: "1"
- option_name: BUNDLE_PATH
value: "vendor/bundle"
packages:
yum:
curl: []
You can’t perform that action at this time.