Sammy
Sammy

Reputation: 1218

Symfony 2.2 Deployment Questions

Because of an other problem on my server, I tried to setup a real new project and did this (localhost with xampp on windows):

After that, I tried the deployment-steps documentation. I skipped uploading the files and editing parameter.yml (it's already configured for localhost). Than I am running into trouble doing 'B) Update your vendors':

php composer.phar install --optimize-autoloader

This steps remove all my files from the web\bundles\myBundle-folder.

Do I have to tell composer about my bundle? I first thought, that I have to store them somewhere else, but this thread tells me, that I am right?!

Upvotes: 0

Views: 150

Answers (1)

stedekay
stedekay

Reputation: 497

The thread you are mentioning is from symfony 1, but you are installing a symfony 2 application.

In web/bundles are your assets installed (css, javascript and images). Your bundles which will be installed via composer are in your vendors folder.

And your own bundles should be in the src folder.

I think this is a good start to have a look at where to store your files.

Your css, js and images should be stored in a bundle, e.g.:

src/AcmeDemoBundle/Resources/public/css
src/AcmeDemoBundle/Resources/public/js
src/AcmeDemoBundle/Resources/public/images

And then you can install your assets with php app/console assets:install web and they will be pushed into the web/bundles folder.

Upvotes: 1

Related Questions