This file contains hidden or 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
| image: python:2.7 | |
| .deploy_template: &global_deploy_def | |
| stage: deploy | |
| before_script: | |
| - echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list | |
| - curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
| - apt-get update && apt-get install google-cloud-sdk | |
| after_script: | |
| - source .gitlab-ci.env |
This file contains hidden or 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 is just a cheat sheet: | |
| # On production | |
| sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
| # On local | |
| scp -C production:~/database.sql.gz | |
| dropdb database && createdb database | |
| gunzip < database.sql.gz | psql database |
This file contains hidden or 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
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |