docker_houston 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 654d1f6e350eddc5c93e13e1702444d7a78476cf
|
|
4
|
+
data.tar.gz: 51580fd5b57c63e79e4efa305b9545e217e87bcf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9808228b03bc748ed043c5846bc781ed89f8128050cbfd787821a9bc8ad1fd34de7c97aa2452c939474cd1bce1d3dc1e57d0e4e441d6a66fc6b738de1613e232
|
|
7
|
+
data.tar.gz: d3bc89ec446bc88a2182b2b9a0d6eec6ed7c9e47baf36b63a540c704ebcc789257122f5c35c4c5c80081ebe7c1cf540e31d423a845753f9550f51282ef5c38e9
|
|
@@ -6,6 +6,8 @@ module DockerHouston
|
|
|
6
6
|
class InstallGenerator < Rails::Generators::Base
|
|
7
7
|
|
|
8
8
|
argument :app_name, type: :string, default: Rails.application.class.parent_name.downcase
|
|
9
|
+
argument :app_domain, type: :string, default: "YOUR-APP-HOST-NAME"
|
|
10
|
+
argument :docker_host, type: :string, default: "YOUR-DOCKER_HOST"
|
|
9
11
|
|
|
10
12
|
source_root File.expand_path("../../templates", __FILE__)
|
|
11
13
|
desc "Creates a docker configuration template files to your application."
|
|
@@ -3,7 +3,7 @@ lock '3.4.0'
|
|
|
3
3
|
|
|
4
4
|
set :branch, fetch(:branch, 'master')
|
|
5
5
|
set :application, "<%= app_name %>"
|
|
6
|
-
set :repository, "<%= `git ls-remote --get-url
|
|
6
|
+
set :repository, "<%= `git ls-remote --get-url`.strip %>"
|
|
7
7
|
set :default_stage, "staging"
|
|
8
8
|
|
|
9
9
|
set :scm, "git"
|
|
@@ -19,52 +19,5 @@ set :ssh_options, { forward_agent: true }
|
|
|
19
19
|
|
|
20
20
|
require 'docker_houston/capistrano'
|
|
21
21
|
|
|
22
|
-
set :working_dir, "/home/deploy/dockerised_apps/<%= app_name%>"
|
|
22
|
+
set :working_dir, "/home/deploy/dockerised_apps/<%= app_name %>"
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
# set :rollbar_token, ENV['ROLLBAR_TOKEN']
|
|
26
|
-
# set :rollbar_env, Proc.new { fetch(:stage) }
|
|
27
|
-
# set :rollbar_role, Proc.new{ :app }
|
|
28
|
-
# set :linked_files, fetch(:linked_files, []).push('config/database.yml', '.env')
|
|
29
|
-
|
|
30
|
-
# Default branch is :master
|
|
31
|
-
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
|
|
32
|
-
|
|
33
|
-
# Default deploy_to directory is /var/www/my_app_name
|
|
34
|
-
# set :deploy_to, '/var/www/my_app_name'
|
|
35
|
-
|
|
36
|
-
# Default value for :scm is :git
|
|
37
|
-
# set :scm, :git
|
|
38
|
-
|
|
39
|
-
# Default value for :format is :pretty
|
|
40
|
-
# set :format, :pretty
|
|
41
|
-
|
|
42
|
-
# Default value for :log_level is :debug
|
|
43
|
-
# set :log_level, :debug
|
|
44
|
-
|
|
45
|
-
# Default value for :pty is false
|
|
46
|
-
# set :pty, true
|
|
47
|
-
|
|
48
|
-
# Default value for :linked_files is []
|
|
49
|
-
# set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
|
|
50
|
-
|
|
51
|
-
# Default value for linked_dirs is []
|
|
52
|
-
# set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system')
|
|
53
|
-
|
|
54
|
-
# Default value for default_env is {}
|
|
55
|
-
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
|
56
|
-
|
|
57
|
-
# Default value for keep_releases is 5
|
|
58
|
-
# set :keep_releases, 5
|
|
59
|
-
|
|
60
|
-
namespace :deploy do
|
|
61
|
-
after :restart, :clear_cache do
|
|
62
|
-
on roles(:web), in: :groups, limit: 3, wait: 10 do
|
|
63
|
-
# Here we can do anything such as:
|
|
64
|
-
# within release_path do
|
|
65
|
-
# execute :rake, 'cache:clear'
|
|
66
|
-
# end
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
end
|
|
@@ -10,7 +10,7 @@ postgresql:
|
|
|
10
10
|
web:
|
|
11
11
|
build: .
|
|
12
12
|
volumes:
|
|
13
|
-
- /home/deploy/dockerised_apps/nginx-proxy/assets/<%=
|
|
13
|
+
- /home/deploy/dockerised_apps/nginx-proxy/assets/<%= app_domain %>/public:/app/public/
|
|
14
14
|
- /home/deploy/dockerised_apps/logs/<%= app_name %>/:/app/log/
|
|
15
15
|
- /home/deploy/dockerised_apps/logs/<%= app_name %>/unicorn:/var/log/
|
|
16
16
|
ports:
|
|
@@ -20,7 +20,7 @@ web:
|
|
|
20
20
|
environment: &web
|
|
21
21
|
RAILS_ENV: staging
|
|
22
22
|
SECRET_KEY_BASE: 43834f4b48946cb62b30130a4577cec2d0a842fcf97095706ccf0de7f293689336c1c0f84a55a26a689ca8ca21edd6da477a9ba9adce48176fe0b23e17f16fd4
|
|
23
|
-
VIRTUAL_HOST: <%=
|
|
23
|
+
VIRTUAL_HOST: <%= app_domain %>
|
|
24
24
|
<<: *postgres
|
|
25
25
|
# env_file: ../shared/.env
|
|
26
26
|
command: ./bin/docker
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
role :web, "
|
|
2
|
-
role :app, "
|
|
1
|
+
role :web, "<%= @docker_host %>"
|
|
2
|
+
role :app, "<%= @docker_host %>"
|
|
3
3
|
|
|
4
4
|
set :app_name, "<%= @app_name %>"
|
|
5
5
|
|
|
6
6
|
set :rails_env, "staging"
|
|
7
|
-
server
|
|
7
|
+
server "<%= @docker_host %>", user: 'deploy', roles: [:app, :install]
|
|
8
8
|
set :working_dir, "/home/deploy/dockerised_apps/#{fetch(:app_name)}/current"
|
|
9
9
|
set :deploy_to, "#{fetch(:working_dir).chomp('current')}"
|
|
10
10
|
set :release_dir, ->{Pathname.new("/home/deploy/dockerised_apps/#{fetch(:app_name)}/current")}
|