Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venshop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tan Phat Nguyen
venshop
Commits
da9fe189
Commit
da9fe189
authored
Nov 21, 2014
by
Tan Phat Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bin folder
parent
48cb5764
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
8 deletions
+41
-8
bin/bundle
+1
-1
bin/rails
+1
-1
bin/rake
+1
-1
bin/setup
+29
-0
config/deploy.rb
+4
-2
config/deploy/production.rb
+4
-2
config/unicorn/production.rb
+1
-1
No files found.
bin/bundle
100644 → 100755
View file @
da9fe189
#!/usr/bin/env ruby
.exe
#!/usr/bin/env ruby
ENV
[
'BUNDLE_GEMFILE'
]
||=
File
.
expand_path
(
'../../Gemfile'
,
__FILE__
)
ENV
[
'BUNDLE_GEMFILE'
]
||=
File
.
expand_path
(
'../../Gemfile'
,
__FILE__
)
load
Gem
.
bin_path
(
'bundler'
,
'bundle'
)
load
Gem
.
bin_path
(
'bundler'
,
'bundle'
)
bin/rails
100644 → 100755
View file @
da9fe189
#!/usr/bin/env ruby
.exe
#!/usr/bin/env ruby
APP_PATH
=
File
.
expand_path
(
'../../config/application'
,
__FILE__
)
APP_PATH
=
File
.
expand_path
(
'../../config/application'
,
__FILE__
)
require_relative
'../config/boot'
require_relative
'../config/boot'
require
'rails/commands'
require
'rails/commands'
bin/rake
100644 → 100755
View file @
da9fe189
#!/usr/bin/env ruby
.exe
#!/usr/bin/env ruby
require_relative
'../config/boot'
require_relative
'../config/boot'
require
'rake'
require
'rake'
Rake
.
application
.
run
Rake
.
application
.
run
bin/setup
0 → 100755
View file @
da9fe189
#!/usr/bin/env ruby
require
'pathname'
# path to your application root.
APP_ROOT
=
Pathname
.
new
File
.
expand_path
(
'../../'
,
__FILE__
)
Dir
.
chdir
APP_ROOT
do
# This script is a starting point to setup your application.
# Add necessary setup steps to this file:
puts
"== Installing dependencies =="
system
"gem install bundler --conservative"
system
"bundle check || bundle install"
# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
# system "cp config/database.yml.sample config/database.yml"
# end
puts
"
\n
== Preparing database =="
system
"bin/rake db:setup"
puts
"
\n
== Removing old logs and tempfiles =="
system
"rm -f log/*"
system
"rm -rf tmp/cache"
puts
"
\n
== Restarting application server =="
system
"touch tmp/restart.txt"
end
config/deploy.rb
View file @
da9fe189
...
@@ -2,14 +2,16 @@
...
@@ -2,14 +2,16 @@
lock
'3.2.1'
lock
'3.2.1'
set
:application
,
'venshop'
set
:application
,
'venshop'
set
:repo_url
,
'git@gitlab.zigexn.vn:phatnt/venshop.git'
# set :repo_url, 'git@gitlab.zigexn.vn:phatnt/venshop.git'
set
:repo_url
,
'git@bitbucket.org:ntphat/demo.git'
set
:branch
,
'release'
set
:branch
,
'release'
# Default branch is :master
# Default branch is :master
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call
# Default deploy_to directory is /var/www/my_app
# Default deploy_to directory is /var/www/my_app
set
:deploy_to
,
'/web/training/phatnt'
# set :deploy_to, '/web/training/phatnt'
set
:deploy_to
,
'/home/deployer/phatnt'
# Default value for :scm is :git
# Default value for :scm is :git
# set :scm, :git
# set :scm, :git
...
...
config/deploy/production.rb
View file @
da9fe189
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
# is considered to be the first unless any hosts have the primary
# is considered to be the first unless any hosts have the primary
# property set. Don't declare `role :all`, it's a meta role.
# property set. Don't declare `role :all`, it's a meta role.
role
:app
,
%w{192.168.1.204}
# role :app, %w{192.168.1.204}
role
:app
,
%w{128.199.154.62}
# role :web, %w{deploy@example.com}
# role :web, %w{deploy@example.com}
# role :db, %w{deploy@example.com}
# role :db, %w{deploy@example.com}
...
@@ -32,7 +33,8 @@ role :app, %w{192.168.1.204}
...
@@ -32,7 +33,8 @@ role :app, %w{192.168.1.204}
# }
# }
#
#
set
:ssh_options
,
{
set
:ssh_options
,
{
user:
'ventura'
# user: 'ventura'
user:
'deployer'
}
}
# And/or per server (overrides global)
# And/or per server (overrides global)
...
...
config/unicorn/production.rb
View file @
da9fe189
app_path
=
'/
web/training
/phatnt'
app_path
=
'/
home/deployer
/phatnt'
working_directory
"
#{
app_path
}
/current"
working_directory
"
#{
app_path
}
/current"
pid
"
#{
app_path
}
/current/tmp/pids/unicorn.pid"
pid
"
#{
app_path
}
/current/tmp/pids/unicorn.pid"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment