Skip to content

Instantly share code, notes, and snippets.

@heshanh
heshanh / 03-theme-update.conf
Created December 17, 2019 01:40
Bedrock & Sage on elasticbeanstalk
commands:
create_post_dir:
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/sage.sh":
mode: "000755"
owner: root
group: root
content: |
@heshanh
heshanh / 02-composer-paths.conf
Created December 17, 2019 01:38
Elasticbeanstalk Update Composer paths
commands:
01updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /tmp
@heshanh
heshanh / 01.maxupload.conf
Created December 17, 2019 01:38
Elasticbeanstalk Update max upload file size
files:
"/etc/php.d/project.ini" :
mode: "000644"
owner: root
group: root
content: |
upload_max_filesize=64M
post_max_size=64M
@heshanh
heshanh / Cpanel Codeship FTP deployment for Bedrock and Sage
Last active December 17, 2019 01:36
Codeship S/FTP deployment to Cpanel Server (not safe)
#THIS IS NOT A SAFE WAY TO DEPLOY AS FTP PASSWORD/USERBANE IS EXPOSED. USE THIS IF THERE IS NO OTHER WAY
#
#Deploys code to cpanel
sshpass -p 'PASSWORD' rsync --progress -avz -e "ssh" ~/clone/ FTPUSER@HOST/IP:/home/webroot
#
#runs compsoer on bedrock and sage
sshpass -p 'PASSWORD' "ssh" FTPUSER@HOST/IP "cd webroot && /opt/cpanel/ea-php73/root/usr/bin/php /opt/cpanel/composer/bin/composer install && cd /home/webroot/web/app/themes/theme-dir && /opt/cpanel/ea-php73/root/usr/bin/php /opt/cpanel/composer/bin/composer install"
$(function()
{
$('.expo_wrap').css('width',$('.expo_wrap').prev().width());
$('.expo_wrap').css('height',$('.expo_wrap').prev().height())
})
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end