Changing settings to deploy aspnet app to ubuntu using Capistrano

Viewed 14

I am helping a friend to update an application where the original developer has gone AWOL!

It appears to be about 3/4 years old, and I am unfamiliar with how it was deployed to the server. It looks to use a automation tool called Capistrano. It is hosted on digital ocean on a droplet running an ubuntu VM.

The app has a config folder with a ruby file deploy.rb and inside the config folder a deploy folder with two more ruby files, production.rb and staging.rb and some files linked to Capistrano, Capfile gemfile gemfile.lock

//production.rb

//Lots of commented out code above and below this line, but this is the only active line of code

 role :app, %w{deployer@serverIpAddress}, port: 22


//staging.rb

//Lots of commented out code above and below this line. But this is the only active line of code.

 role :app, %w{deployer@AnotherIpAddress}, port: 222 // I am not sure what this ip address is


deply.rb
lock "~> 3.11.0"

set :application, "adi-net"
set :repo_url, "git@github.com:username/ADI.NET.git" //this is the username of the original developer.
set :branch, "feature/issues"
set :deploy_to, "/home/deployer/apps"
set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto
#append :linked_files, "appsettings.json"

# Default value for linked_dirs is []
# append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/system"

# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }

# Default value for local_user is ENV['USER']
# set :local_user, -> { `git config user.name`.chomp }

# Default value for keep_releases is 5
set :keep_releases, 5
# set :ssh_options, verify_host_key: :secure
gemfile.lock
GIT
  remote: https://github.com/hoppinger/capistrano-dotnet.git
  revision: b11e4194747ee09f8b93d9ee296eafba1530a53a
  specs:
    capistrano-dotnet (0.1.0)
      capistrano (>= 3.0.0)

GEM
  remote: https://rubygems.org/
  specs:
    airbrussh (1.3.2)
      sshkit (>= 1.6.1, != 1.7.0)
    bcrypt_pbkdf (1.0.1)
    bcrypt_pbkdf (1.0.1-x64-mingw32)
    capistrano (3.11.0)
      airbrussh (>= 1.0.0)
      i18n
      rake (>= 10.0.0)
      sshkit (>= 1.9.0)
    concurrent-ruby (1.1.5)
    dicom (0.9.8)
    ed25519 (1.2.4)
    i18n (1.6.0)
      concurrent-ruby (~> 1.0)
    net-scp (2.0.0)
      net-ssh (>= 2.6.5, < 6.0.0)
    net-ssh (5.2.0)
    rake (12.3.2)
    sshkit (1.19.1)
      net-scp (>= 1.1.2)
      net-ssh (>= 2.8.0)

PLATFORMS
  ruby
  x64-mingw32

DEPENDENCIES
  bcrypt_pbkdf
  capistrano
  capistrano-dotnet!
  dicom
  ed25519

BUNDLED WITH
   1.17.2
gemfile
source "https://rubygems.org"
git_source(:github) { | repo | "https://github.com/#{repo}.git" }

gem "capistrano"
gem "capistrano-dotnet", github: "hoppinger/capistrano-dotnet"
#gem "rmagick"
gem "dicom"
gem "ed25519"
gem "bcrypt_pbkdf"
capfile
# Load DSL and set up stages
require "capistrano/setup"

# Include default deployment tasks
require "capistrano/deploy"

# Load the SCM plugin appropriate to your project:
#
# require "capistrano/scm/hg"
# install_plugin Capistrano::SCM::Hg
# or
# require "capistrano/scm/svn"
# install_plugin Capistrano::SCM::Svn
# or
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
require 'capistrano/dotnet'

# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
#   https://github.com/capistrano/rvm
#   https://github.com/capistrano/rbenv
#   https://github.com/capistrano/chruby
#   https://github.com/capistrano/bundler
#   https://github.com/capistrano/rails
#   https://github.com/capistrano/passenger
#
# require "capistrano/rvm"
# require "capistrano/rbenv"
# require "capistrano/chruby"
# require "capistrano/bundler"
# require "capistrano/rails/assets"
# require "capistrano/rails/migrations"
# require "capistrano/passenger"

# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }

Is it simply a case of adjusting the github username in the deploy.rb file, to mine, and it will then launch the app from mine if I run dotnet publish from virtual studio 2019?

0 Answers
Related