Allow configuration location to be configurable #684

Merged
merged 1 commit into from Oct 14, 2013

Conversation

Projects
None yet
8 participants
@seenmyfate
Member

seenmyfate commented Oct 11, 2013

This change allows both the deploy_config_path and stage_config_path
to be moved from the default locations of config/deploy.rb and
config/deploy respectively. These values must be set in the
Capfile prior to capistrano/setup being called, for example:

set :deploy_config_path, 'app/config/deploy.rb'
set :stage_config_path, 'app/config/deploy'

# Load DSL and Setup Up Stages
require 'capistrano/setup'

Fixes #610

@andyshinn

This comment has been minimized.

Show comment
Hide comment
@andyshinn

andyshinn Oct 12, 2013

👍 seems to be working in my environment!

👍 seems to be working in my environment!

Allow configuration location to be configurable
This change allows both the `deploy_config_path` and `stage_config_path`
to be moved from the default locations of `config/deploy.rb` and
`config/deploy` respectively.  These values __must__ be set in the
`Capfile` prior to `capistrano/setup` being called, for example:

    set :deploy_config_path, 'app/config/deploy.rb'
    set :stage_config_path, 'app/config/deploy'

    # Load DSL and Setup Up Stages
    require 'capistrano/setup'

Fixes #610

seenmyfate added a commit that referenced this pull request Oct 14, 2013

Merge pull request #684 from capistrano/feature/configurable-config
Allow configuration location to be configurable

@seenmyfate seenmyfate merged commit 08cf56e into 3.1.x Oct 14, 2013

@seenmyfate seenmyfate deleted the feature/configurable-config branch Oct 14, 2013

@pasupulaphani

This comment has been minimized.

Show comment
Hide comment
@pasupulaphani

pasupulaphani Feb 15, 2014

Cheers for this fix. Very helpful.

Cheers for this fix. Very helpful.

@micha149

This comment has been minimized.

Show comment
Hide comment
@micha149

micha149 Mar 14, 2014

Great, thanks a lot! 👍

Great, thanks a lot! 👍

@henter

This comment has been minimized.

Show comment
Hide comment
@henter

henter Mar 29, 2014

Great !
I just use this to deploy symfony2 project, thanks!!

henter commented Mar 29, 2014

Great !
I just use this to deploy symfony2 project, thanks!!

@khmelevskii

This comment has been minimized.

Show comment
Hide comment
@khmelevskii

khmelevskii Jun 25, 2014

not work for me
Capfile

set :deploy_config_path, 'capistrano/deploy.rb'
set :stage_config_path, 'capistrano/deploy'

# Load DSL and Setup Up Stages
require 'capistrano/setup'

capistrano/deploy/staging.rb

# Simple Role Syntax
# ==================
role :app, 'test.com'
role :web, 'test.com'
role :db, 'test.com'
.........

i have error:

INFO[804e996a] Running /usr/bin/env mkdir -p /tmp// on test.com
DEBUG[804e996a] Command: /usr/bin/env mkdir -p /tmp//
INFO[804e996a] Finished in 0.219 seconds with exit status 0 (successful).
DEBUGUploading /tmp//git-ssh.sh 0.0%
INFOUploading /tmp//git-ssh.sh 100.0%

variables from capistrano/deploy.rb not sets

not work for me
Capfile

set :deploy_config_path, 'capistrano/deploy.rb'
set :stage_config_path, 'capistrano/deploy'

# Load DSL and Setup Up Stages
require 'capistrano/setup'

capistrano/deploy/staging.rb

# Simple Role Syntax
# ==================
role :app, 'test.com'
role :web, 'test.com'
role :db, 'test.com'
.........

i have error:

INFO[804e996a] Running /usr/bin/env mkdir -p /tmp// on test.com
DEBUG[804e996a] Command: /usr/bin/env mkdir -p /tmp//
INFO[804e996a] Finished in 0.219 seconds with exit status 0 (successful).
DEBUGUploading /tmp//git-ssh.sh 0.0%
INFOUploading /tmp//git-ssh.sh 100.0%

variables from capistrano/deploy.rb not sets

@drbild

This comment has been minimized.

Show comment
Hide comment
@drbild

drbild Jun 27, 2014

@khmelevskii

It fails if the custom directory is named capistrano. This should probably be reported as a new bug.

drbild commented Jun 27, 2014

@khmelevskii

It fails if the custom directory is named capistrano. This should probably be reported as a new bug.

@Oliboy50 Oliboy50 referenced this pull request in capistrano/documentation Oct 31, 2015

Merged

Add FAQ "how to change config paths?" #141

@webdevilopers

This comment has been minimized.

Show comment
Hide comment
@webdevilopers

webdevilopers Nov 16, 2015

If I'm getting this right the paths can only be changes after installing the Capfile?
Or is there an extra flag like --config_path=...?

If I'm getting this right the paths can only be changes after installing the Capfile?
Or is there an extra flag like --config_path=...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment