First we consider the development environment.
It will be done using virtualbox + vagrant + ubuntu14.04
- Inside develop environment nginx (install using ubuntu repositories):
########################################
#remove all containers | |
docker rm $(docker kill $(docker ps -a -q)) | |
docker rmi image_id #where image_id is the id of the specific image you want to remove | |
docker ps -a # Lists all containers | |
docker build -t django18-python27-ubuntu1404 . ## build docker reponame dockerfilepath | |
docker run -ti django18-python27-ubuntu1404 sh ## run the docker and go in |
pm WARN package.json starter-kit@0.0.1 No repository field. | |
npm WARN deprecated css-sprite@0.9.9: css-sprite is now called sprity | |
npm WARN optional dep failed, continuing fsevents@0.3.6 | |
> spawn-sync@1.0.11 postinstall /var/virtual/WebApps/kstest/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/bin-check/node_modules/spawn-sync | |
> node postinstall | |
> spawn-sync@1.0.11 postinstall /var/virtual/WebApps/kstest/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/bin-check/node_modules/spawn-sync | |
> node postinstall |
By default, should never change the postgres user password
See http://serverfault.com/a/325596/61030
To access the database as postgres
,
sudo -u postgres psql postgres
# setting for staging environment | |
task :staging do | |
# If you aren't deploying to /u/apps/#{application} on the target | |
# servers (which is the default), you can specify the actual location | |
# via the :deploy_to variable: | |
set :deploy_to, "/var/www/staging" | |
after("deploy:default", :copy_config_files) | |
end | |
#Deployment tasks |
#!/bin/sh | |
sed -i 's/Configure::write('debug', 2);/Configure::write('debug', 0);/g' /opt/lampp/htdocs/wp/app/config/bootstrap.local.php | |
# idea is bootstrap.local.php is the file | |
# original string is Configure::write('debug', 2); | |
# replace it with Configure::write('debug', 0); |
#!/bin/bash | |
cp myapp/Config/core.php myapp/Config/core.php.backup | |
echo "Configure::write('Acl.database', 'test');" >> myapp/Config/core.php | |
lib/Cake/Console/cake testsuite -app myapp app | |
mv myapp/Config/core.php.backup myapp/Config/core.php |
#!/bin/bash | |
### | |
# | |
# Copyright (c) 2012 https://github.com/simkimsia | |
# | |
# Ubuntu 11.04, 11.10 based installation script for Python, Pip and Fabric | |
# Run this by executing the following from a fresh install of Ubuntu 11.04, 11.10 server: | |
# | |
# bash -c "$(curl -fsSL https://raw.github.com/gist/2631668)" |
#!/bin/bash | |
### | |
# | |
# forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea | |
# Copyright (c) 2011 Cake Development Corporation (http://cakedc.com) | |
# | |
# Ubuntu 11.xx server installation script for Jenkins | |
# Run this by executing the following from a fresh install of Ubuntu 11.xx server: | |
# |
<?php | |
//Define an array of character information | |
$characters = array( | |
'yakko' => array ( | |
'id' => 'yakkowarner', | |
'url' => 'characterview.php?id=yakkowarner', | |
'name' => 'Yakko Warner' | |
), |