Deploy using Capistrano + Gitlab with: remote_cache

I use capistrano to deploy a PHP web application, and we have an internal gitlab server that is not available offline. I am trying to deploy using remote_cache as it takes a lot of time if used to copy it. I already checked This and This , but did not get the desired result. I am trying to use the code below.

set :default_stage, "staging"
ssh_options[:forward_agent] = true
server "servername", :app, :web, :db, :primary => true
set :application, "appname"
set :scm, :git
set :repository, '.'
set :local_repository, "file://."
set :branch, "master"
default_run_options[:pty] = true
set :keep_releases, 2
set :user, 'username'
set :deploy_to, "/home/domain/public_html/test"    
set :copy_cache, true
set :deploy_via, :remote_cache
set :copy_strategy, :export
set :use_sudo, false
set :copy_exclude, [".git", ".DS_Store", ".gitignore", ".gitmodules", "Capfile", "config/deploy.rb"]

Which way to use repository and local repository. Any suggestions how can I achieve this? EDIT: Can I use local repo for remote cache.

+4
1

remote_cache?

:repository - URL-, . , Git , , :///path_to_repo

:local_repository - URL, , capistrano script on. , : - , capistrano .

:

set :repository, "file:///home/git/my_repo"
set :local_repository, "http://server_address/my_repo"

, , , Github, :repository ( :local_repository)

set :repository, "git@github.com/your_account/your_repo.git"

Capistrano remote_cache (shared/cached-copy).

script?

+2

Source: https://habr.com/ru/post/1538379/


All Articles