mercredi 31 mai 2017

Deploy laravel ovh git composer in preprod and production env

I have a mutual server on OVH with an ssh key. I use laravel 5 for backend api and angularjs in front. I would like to deploy in my server 2 environment production(client)/preproduction(for test restricted by ip with htaccess). Wich is the best solution to do that with git and composer:

1st proposition: structure repository in my server :

bin/composer
depot_git/hooks/post-receive
 - MASTER
 - DEVELOP
Production (branch MASTER)
 - app  
 - bootstrap
 - config
 - config 
 - database
 - public 
 - ...
Preproduction (branch DEVELOP)
 - app      
 - bootstrap
 - config
 - config 
 - database
 - public 
 - ...

2nd proposition: structure repository in my server :

bin/composer
depot_git/hooks/post-receive
www/Production (branch MASTER)
 - app  
 - bootstrap
 - config
 - config 
 - database
 - public 
 - ...
www/Preproduction (branch DEVELOP)
 - app      
 - bootstrap
 - config
 - config 
 - database
 - public 
 - ...

I really would like to use the first proposition, what do you think? Do you have any other idea?

I need to have finally :

  • www.domain.com -> Production/public

  • http://ift.tt/2sdDiYC -> Preproduction/public

How can I do that? DNS?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire