Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8705023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:15:06+00:00 2026-06-13T03:15:06+00:00

Our deploy strategy: We have environment-scoped db config and .htaccess files (think prod.htaccess ,

  • 0

Our deploy strategy: We have environment-scoped db config and .htaccess files (think prod.htaccess, dev.htaccess and local.htaccess). Deploys are done using capistrano, which starts with a checkout of the branch to be deployed, then deletes Capfile and out-of-scope .htaccess files and renames the in-scope htaccess from [env].htaccess to .htaccess. This complete, the repository/public_html directory is transferred via non-deleting rsync to the apache webroot.

Background: The company I work for is an online publication that’s
been around since 1998 and the deploy strategy is convoluted because
the folder structure is a mess: version-controlled files live next to
generated files and user-uploaded files. This being the case, we can’t
just symlink the entire apache webroot folder to the corresponding
folder in /current. Generated files would be wiped out on each time
a new deploy is made, the user uploaded files scattered about the
directories would have to be symlinked in from other places, etc. Thus
the non-deleting rsync operation.

The current insanity alluded to above is a question for another day, though.

What I want is a solution that doesn’t require the deleting and renaming of htaccess and db config files in the repo upon deploy. The reason is so that we can work in and commit from /deploy/current without having to contend with the tangle of local changes from the deploy.

What are the typical solutions for deployment of environment-scoped files like this? Should I move them to a /config folder above /public_html and symlink from apache webroot to the relevant files in /config depending on environment?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:15:07+00:00Added an answer on June 13, 2026 at 3:15 am

    I would recommend you to approach this in the following way:

    • Still keep all your [env].htaccess files in the repository.
    • After deploy:update symlink all of your [env].htaccess files to .htaccess
      symlinks (ln --symbolic [env].htaccess .htaccess)
    • Do not delete the *.htaccess files.
    • Let the developers / sysops edit the *.htaccess files (they will have access to the in scope files via the .htaccess symlink and to all of the out of scope [env].htaccess files to.
    • Let the developers / sysops commit right from the deploy/current folder (but be sure that it is valid repository from which you can commit.).
    • Use this process for other types of files you work with.

    I think this might solve the problem you described or at least ease it. I would personally start doing this like that and see how it will work out.

    BTW Why do you delete the Capfile after deploy:update?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm rejigging our deploy scripts, and have moved to external config files for each
We use TFS to deploy our applications to multiple environments (Dev, QA, Prod). Simple
We have to deploy our application on a Windows 2008 64 bit server. As
I have a SSRS 2008 RDL report that I deploy on our report server.
I have a rather complicated deploy setup for our Drupal site that is a
It appears that we will have to build/deploy one of our new JBoss apps
We want to encrypt all our web app configuration files that we deploy to
All, We are using ClickOnce to deploy our WPF application and have the need
We're one step away from our first AppStore deployment. Unfortunately we have to deploy
Whenever we deploy our sharepoint website we have pages that show a login-window to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.