mina works
This commit is contained in:
@ -1,41 +1,75 @@
|
||||
# config valid for current version and patch releases of Capistrano
|
||||
lock "~> 3.17.0"
|
||||
require 'mina/rails'
|
||||
require 'mina/git'
|
||||
require 'mina/rbenv' # for rbenv support. (https://rbenv.org)
|
||||
|
||||
set :application, "gateway"
|
||||
set :repo_url, "https://github.com/rubydesign/gateway.git"
|
||||
# Basic settings:
|
||||
# domain - The hostname to SSH to.
|
||||
# deploy_to - Path to deploy into.
|
||||
# repository - Git repo to clone from. (needed by mina/git)
|
||||
# branch - Branch name to deploy. (needed by mina/git)
|
||||
|
||||
# Default branch is :master
|
||||
set :branch, :main
|
||||
set :application_name, 'gateway'
|
||||
set :domain, 'web-server.local'
|
||||
set :deploy_to, '/home/feenix/gateway'
|
||||
set :repository, "https://github.com/rubydesign/gateway.git"
|
||||
set :branch, 'main'
|
||||
|
||||
# Default deploy_to directory is /var/www/my_app_name
|
||||
set :deploy_to, "/home/feenix/gateway"
|
||||
# Optional settings:
|
||||
set :user, 'feenix' # Username in the server to SSH to.
|
||||
# set :port, '30000' # SSH port number.
|
||||
# set :forward_agent, true # SSH forward_agent.
|
||||
|
||||
# Default value for :format is :airbrussh.
|
||||
# set :format, :airbrussh
|
||||
# Shared dirs and files will be symlinked into the app-folder by the 'deploy:link_shared_paths' step.
|
||||
# Some plugins already add folders to shared_dirs like `mina/rails` add `public/assets`, `vendor/bundle` and many more
|
||||
# run `mina -d` to see all folders and files already included in `shared_dirs` and `shared_files`
|
||||
# set :shared_dirs, fetch(:shared_dirs, []).push('public/assets')
|
||||
# set :shared_files, fetch(:shared_files, []).push('config/database.yml', 'config/secrets.yml')
|
||||
|
||||
# You can configure the Airbrussh format using :format_options.
|
||||
# These are the defaults.
|
||||
# set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto
|
||||
# This task is the environment that is loaded for all remote run commands, such as
|
||||
# `mina deploy` or `mina rake`.
|
||||
task :remote_environment do
|
||||
# If you're using rbenv, use this to load the rbenv environment.
|
||||
# Be sure to commit your .ruby-version or .rbenv-version to your repository.
|
||||
# invoke :'rbenv:load'
|
||||
|
||||
# Default value for :pty is false
|
||||
# set :pty, true
|
||||
# For those using RVM, use this to load an RVM version@gemset.
|
||||
# invoke :'rvm:use', 'ruby-2.5.3@default'
|
||||
end
|
||||
|
||||
# Default value for :linked_files is []
|
||||
append :linked_files, 'config/master.key'
|
||||
#"config/database.yml",
|
||||
# Put any custom commands you need to run at setup
|
||||
# All paths in `shared_dirs` and `shared_paths` will be created on their own.
|
||||
task :setup do
|
||||
# command %{rbenv install 2.5.3 --skip-existing}
|
||||
# command %{rvm install ruby-2.5.3}
|
||||
# command %{gem install bundler}
|
||||
end
|
||||
|
||||
# Default value for linked_dirs is []
|
||||
append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "tmp/webpacker", "public/system", "vendor", "storage"
|
||||
desc "Deploys the current version to the server."
|
||||
task :deploy do
|
||||
# uncomment this line to make sure you pushed your local branch to the remote origin
|
||||
# invoke :'git:ensure_pushed'
|
||||
deploy do
|
||||
# Put things that will set up an empty directory into a fully set-up
|
||||
# instance of your project.
|
||||
invoke :'git:clone'
|
||||
invoke :'deploy:link_shared_paths'
|
||||
invoke :'bundle:install'
|
||||
invoke :'rails:db_migrate'
|
||||
invoke :'rails:assets_precompile'
|
||||
invoke :'deploy:cleanup'
|
||||
|
||||
# Default value for default_env is {}
|
||||
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
||||
on :launch do
|
||||
in_path(fetch(:current_path)) do
|
||||
command %{mkdir -p tmp/}
|
||||
command %{touch tmp/restart.txt}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Default value for local_user is ENV['USER']
|
||||
# set :local_user, -> { `git config user.name`.chomp }
|
||||
# you can use `run :local` to run tasks on local machine before of after the deploy scripts
|
||||
# run(:local){ say 'done' }
|
||||
end
|
||||
|
||||
# Default value for keep_releases is 5
|
||||
# set :keep_releases, 5
|
||||
|
||||
# Uncomment the following to require manually verifying the host key before first deploy.
|
||||
# set :ssh_options, verify_host_key: :secure
|
||||
set :rbenv_ruby, '3.0.3'
|
||||
# For help in making your deploy script, see the Mina documentation:
|
||||
#
|
||||
# - https://github.com/mina-deploy/mina/tree/master/docs
|
||||
|
@ -1,10 +0,0 @@
|
||||
|
||||
# The server-based syntax can be used to override options:
|
||||
# ------------------------------------
|
||||
server "web-server.local",
|
||||
user: "feenix",
|
||||
roles: %w{web app db},
|
||||
ssh_options: {
|
||||
# auth_methods: %w(publickey)
|
||||
# password: "please use keys"
|
||||
}
|
Reference in New Issue
Block a user