Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since you updated your question, I can give you some relevant info.</p> <p>As you now know, you have a cascading configuration system in symfony which allows different parameters for for example your database connection (among many other things) for your dev and prod environment.</p> <p>As to deployment, symfony comes with a task that utilizes rsync to deploy. In general you do not need to tweak it much, it will by default not deploy any "dev" front controller, so it suits most basic needs. Note that even if the deployment script should exclude the dev front controllers from deploying at all, e ven if you would deploy them, they by default have a small security check which only allows access from localhost. If you need to exclude other files from deployment, you can edit config/rsync_exclude.txt</p> <p>Detailed info in deploying here: <a href="http://www.symfony-project.org/gentle-introduction/1_4/en/16-Application-Management-Tools#chapter_16_deploying_applications" rel="noreferrer">http://www.symfony-project.org/gentle-introduction/1_4/en/16-Application-Management-Tools#chapter_16_deploying_applications</a></p> <p>A big note though, is that this deployment script does NOT handle database deployment. You should do that manually. If you need to deploy database changes to an existing database, you could also do that manual, or look into Doctrine Migrations (assuming you use Doctrine).</p> <p><strong>Update:</strong> you can have a single frontend controller (index.php) for different apps and/or environments. You can either check the hostname or other things, but the cleanest solution I found and employ is setting Apache environment variables. In my Vhost config I'll do:</p> <pre><code>&lt;VirtualHost *:80&gt; Servername www.myproject.dev ... SetEnv SYMFONY_APP frontend SetEnv SYMFONY_ENV dev SetEnv SYMFONY_DEBUG 1 &lt;/VirtualHost&gt; </code></pre> <p>Note that ofcourse I'll have a separate Vhost for every single app/env combination. You shouldn't be deploying vhost configs, so normally you'll only need to set this up once on each host. My modified index.php looks like this:</p> <pre><code>&lt;?php require_once dirname(__FILE__) . '/../config/ProjectConfiguration.class.php'; $app = isset($_SERVER['SYMFONY_APP']) ? $_SERVER['SYMFONY_APP'] : 'frontend'; $env = isset($_SERVER['SYMFONY_ENV']) ? $_SERVER['SYMFONY_ENV'] : 'prod'; $debug = isset($_SERVER['SYMFONY_DEBUG']) ? $_SERVER['SYMFONY_DEBUG'] : false; $configuration = ProjectConfiguration::getApplicationConfiguration($app, $env, $debug); sfContext::createInstance($configuration)-&gt;dispatch(); </code></pre> <p>With this setup, I can just remove frontend_dev.php and any other frontend controllers apart from index.php from my repository.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload