Setup VPS with a Symfony2 project from git repository

265 Views Asked by At

I have a:
- VPS with LAMP stack
- local symfony2 project (git)
- bitbucket repository

What do I need to do to properly setup my project in the production evironment?

Folder structure/permissions?
Can I simply clone the repository in the public folder? (I don't think so)

P.s. I've already read the deployment guide on the symfony2 website, but I didn't find it very useful

1

There are 1 best solutions below

4
On BEST ANSWER

Here are my deployment steps:

  1. git clone project
  2. go to project directory
  3. php composer.phar install (and if composer is not in the project directory curl -sS https://getcomposer.org/installer | php)
  4. app/console doctrine:database:create
  5. app/console schema:update --force
  6. app/console assets:install web --symlink
  7. chmod 777 -R app/cache app/logs web/media/cache (I often use liip imagine, it resizes photo in web/media/cache)
  8. point the virtual host of apache to the web directory of my project. And you are done.

you might want to enable mode rewrite in apach (a2enmod rewrite) I think this covers everything.