maintaining configuration differences between dev and live environments during deployment from SVN

后端 未结 4 720
陌清茗
陌清茗 2021-02-10 13:41

We use the ExpressionEngine CMS (php) to create websites. For each site, we set up a subversion repository and commit the EE installation as well as any custom templates, images

4条回答
  •  遥遥无期
    2021-02-10 14:37

    We deal with this by maintaining a config-specific directory.

    So, for instance if you have different .htaccess and config.php files between dev and production they would be maintained in /trunk/config/{environment}/

    We use ant/nant scripts to create release packages, and the scripts have a build task for each environment. Those tasks pick up the config specific files.

    --

    Another commenter suggests to switch on HTTP_POST. Unfortunately I can't comment directly (not a high enough rep). Using HTTP_POST to determine environmental configuration has potential security issues since the value of this comes from the client.

提交回复
热议问题