Skip to content

Instantly share code, notes, and snippets.

View danishbacker's full-sized avatar

Danish Backer danishbacker

View GitHub Profile
@danishbacker
danishbacker / assets.confg
Created June 25, 2017 00:26 — forked from Azrael808/assets.confg
Automatically Publishing Files to CloudFront in Elastic Beanstalk
container_commands:
01_upload_to_cdn:
command: |
export REGION=`curl -s http://169.254.169.254/latest/dynamic/instance-identity/document |grep region |cut -d: -f2 | sed -e 's/[\",]//g'`
export INCLUDES=`echo $W3TC_CF_FILE_EXTENSIONS | sed 's/;/\ /g'`
for INC in $INCLUDES; do
aws s3 sync wp-includes/ s3://${W3TC_CF_BUCKET_NAME}/wp-includes/ --exclude "*" --include "${INC}" --region $REGION
aws s3 sync wp-content/ s3://${W3TC_CF_BUCKET_NAME}/wp-content/ --exclude "*" --include "${INC}" --region $REGION
done
@danishbacker
danishbacker / circle.yml
Created June 25, 2017 00:18 — forked from Azrael808/circle.yml
CircleCI: Automatically Deploy WordPress to Elastic Beanstalk
machine:
<machine_config>
dependencies:
pre:
- pip install awsebcli
- <other_project_dependencies>
database:
<database_setup>
test:
<test_config>
@danishbacker
danishbacker / phpmyadmin.config
Created June 25, 2017 00:18 — forked from Azrael808/phpmyadmin.config
Install and Configure PHPMyAdmin on Elastic Beanstalk
container_commands:
01_install_pma:
test: test -n "$PMA_VER" && test ! -f /tmp/phpmyadmin.tar.gz
command: |
cd /tmp
wget https://files.phpmyadmin.net/phpMyAdmin/${PMA_VER}/phpMyAdmin-${PMA_VER}-all-languages.tar.gz
wget https://files.phpmyadmin.net/phpMyAdmin/${PMA_VER}/phpMyAdmin-${PMA_VER}-all-languages.tar.gz.sha1
cd /tmp && sha1sum --check phpMyAdmin-${PMA_VER}-all-languages.tar.gz.sha1
if [[ $? == 0 ]]
then