Reputation: 1035
I'm trying to deploy my "develop" branch to my development server but when I run cap development deploy
, I get the following error:
executing "ln -nfs /var/www/xyz.co.uk/shared/web/media /var/www/xyz.co.uk/releases/20130311143220/web/media"
servers: ["x.xx.xx.xxx"]
[x.xx.xx.xxx] executing command
*** [err :: x.xx.xx.xxx] ln:
*** [err :: x.xx.xx.xxx] failed to create symbolic link `/var/www/xyz.co.uk/releases/20130311143220/web/media'
*** [err :: x.xx.xx.xxx] : No such file or directory
*** [err :: x.xx.xx.xxx]
command finished in 44ms
*** [deploy:update_code] rolling back
When I look on the server /var/www/xyz.co.uk/shared/web/media
has been created and /var/www/xyz.co.uk/releases/20130311143220
is created but then once the symlink fails then 20130311143220
is deleted as its rolled back. Any ideas? Im ssh'ing as root.
Capifony Configuration
deploy.rb
set :stage_dir, 'app/config/deploy' # needed for Symfony2 only
set :stages, %w(production staging development)
set :application, "xyz.co.uk"
set :user, "root" # The server's user for deploys
set :repository, "[email protected]:xyz/#{application}.git"
set :scm, :git
set :keep_releases, 3
set :use_sudo, false
set :shared_files, ["app/config/parameters.yml"]
set :shared_children, [app_path + "/logs", web_path + "/media", "vendor"]
set :use_composer, true
set :update_vendors, true
set :dump_assetic_assets, true
require 'capistrano/ext/multistage'
logger.level = Logger::MAX_LEVEL
development.rb
server 'x.xx.xx.xxx', :app, :web, :primary => true
ssh_options[:port] = xxxx
ssh_options[:forward_agent] = true
set :deploy_to, "/var/www/xyz.co.uk/"
set :symfony_env_prod, "test"
UPDATE
The actual error message is:
failed: "sh -c 'ln -nfs /var/www/xyz.co.uk/shared/web/media /var/www/xz.co.uk/releases/20130312135615/web/media'" on x.xx.xx.xxx
Also, here is my .gitignore file:
/web/bundles/
/app/bootstrap*
/app/cache/*
/app/logs/*
/vendor/
/app/config/parameters.yml
composer.phar
/.idea/
/web/media/*
Does it make a difference that my username and password to pull from my git repository is different on my Development server than on my local machine where I am deploying from?
Upvotes: 1
Views: 4125
Reputation: 1035
The reason is because I hadn't set set_branch
to develop so it was using master which was empty!
Upvotes: 1
Reputation: 2358
In your repository server (bitbucked, github), the media folder has been pushed? It seems capifony tries to set as shared a folder that doesn't exist.
Upvotes: 0