1
0
mirror of https://gitnet.fr/deblan/gist.git synced 2021-08-14 08:30:49 +02:00

Deployment

This commit is contained in:
Simon Vieille 2016-02-02 19:31:22 +01:00
parent 3f3aa04ab5
commit 0199148aec
10 changed files with 53 additions and 28 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
.mage/config/environment/*.yml
.mage/logs/*.log
composer.lock
vendor/
tags

0
.mage/config/environment/.gitignore vendored Normal file
View File

View File

@ -0,0 +1,27 @@
# prod
# Rename this file to "prod.yml"
deployment:
user: gist
from: ./
to: /var/www/gist/
excludes:
- "*.svn"
- "*.git"
- "*.swp"
- "app/config/propel/"
- "app/propel/"
- "data/git"
- "deploy"
- "tags"
- "propel.yaml"
- "composer.lock"
- "composer.json"
- "bower.json"
- ".bowerrc"
hosts:
- gist.mycompany.com
tasks:
pre-deploy:
on-deploy:
post-deploy:
verbose_logging: true

7
.mage/config/general.yml Normal file
View File

@ -0,0 +1,7 @@
# global settings
name: Gist
email:
notifications: false
logging: true
maxlogs: 30
ssh_needs_tty: false

2
.mage/logs/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

0
.mage/tasks/.gitignore vendored Normal file
View File

View File

@ -52,4 +52,3 @@ propel:
./vendor/propel/propel/bin/propel model:build --recursive
./vendor/propel/propel/bin/propel migration:diff --recursive
./vendor/propel/propel/bin/propel migration:migrate --recursive
./vendor/propel/propel/bin/propel model:build --recursive

View File

@ -207,3 +207,18 @@ Edit `app/bootstrap.php.d/70-security.php` and modify the value of `$app['enable
### Debug
`app_dev.php` is the development router. Access is granted for an IP range defined in the same file.
Deployment
----------
Gist uses [Magallanes](http://magephp.com/) to mange deployment.
$ composer global require andres-montanez/magallanes
$ # if the envvar PATH contains "$HOME/bin/"
$ ln -s ~/.composer/vendor/bin/mage ~/bin/mage
There is an example of the configuration of an environment in `.mage/config/environment/prod.yml-dist`.
$ mage deploy to:prod

View File

@ -1,13 +0,0 @@
*.svn
*.git
*.swp
app/config/propel/
app/propel/
data/git
deploy
tags
propel.yaml
composer.lock
composer.json
bower.json
.bowerrc

View File

@ -1,14 +0,0 @@
#!/bin/sh
cd "$(dirname "$0")/.."
deploy_preprod() {
rsync -avzoK --delete -e ssh --exclude-from=app/config/rsync_exclude.txt * webgist@deblan.fr:/services/web/www/gist.deblan.org/
}
deploy_preprod_lan() {
rsync -avzoK --delete -e ssh --exclude-from=app/config/rsync_exclude.txt * webgist@hinata:/services/web/www/gist.deblan.org/
}
([ -n "$1" ] && deploy_$1) || deploy_preprod