orchestration 0.7.10 → 0.7.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/orchestration/install_generator.rb +27 -0
- data/lib/orchestration/templates/Dockerfile.erb +11 -4
- data/lib/orchestration/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76a744cb6cc82929bcaea021634c1af4b7b34392659e1a3d799ddd61854e6dee
|
4
|
+
data.tar.gz: d42940c62fa5488a64cf3e6c245938de8d1cf8e47536fd9a0075903dcd54d272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ad4095426917667b72150004b57525ffedaedf84be6c68b727ca782814c5a053a45f6e33c8cc36bcc95825863bbe36684862b3c31f501ad3938f40217d3f39e
|
7
|
+
data.tar.gz: fa5d209da39d650a7bbb52b786d900f3e5ebcce7ea69a9c662cbc3ddadbd318be82f3764d744420215a67e569436870c157ed244670d4471e00cdf16f9b8a23c
|
data/Gemfile.lock
CHANGED
@@ -17,6 +17,8 @@ module Orchestration
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def orchestration_configuration
|
20
|
+
return unless build?('.orchestration.yml')
|
21
|
+
|
20
22
|
configure_orchestration_settings
|
21
23
|
relpath = relative_path(@env.orchestration_configuration_path)
|
22
24
|
return @terminal.write(:create, relpath) unless @settings.exist? || force?
|
@@ -26,11 +28,15 @@ module Orchestration
|
|
26
28
|
end
|
27
29
|
|
28
30
|
def application_makefile
|
31
|
+
return unless build?('Makefile')
|
32
|
+
|
29
33
|
path = @env.root.join('Makefile')
|
30
34
|
simple_copy('application.mk', path) unless File.exist?(path)
|
31
35
|
end
|
32
36
|
|
33
37
|
def dockerfile
|
38
|
+
return unless build?('Dockerfile')
|
39
|
+
|
34
40
|
create_file(
|
35
41
|
orchestration_dir.join('Dockerfile'),
|
36
42
|
dockerfile_content,
|
@@ -39,6 +45,8 @@ module Orchestration
|
|
39
45
|
end
|
40
46
|
|
41
47
|
def entrypoint_sh
|
48
|
+
return unless build?('entrypoint.sh')
|
49
|
+
|
42
50
|
content = template('entrypoint.sh')
|
43
51
|
path = orchestration_dir.join('entrypoint.sh')
|
44
52
|
create_file(path, content, overwrite: false)
|
@@ -46,12 +54,15 @@ module Orchestration
|
|
46
54
|
end
|
47
55
|
|
48
56
|
def docker_compose
|
57
|
+
return unless build?('docker-compose.yml')
|
58
|
+
|
49
59
|
@docker_compose.docker_compose_test_yml
|
50
60
|
@docker_compose.docker_compose_development_yml
|
51
61
|
@docker_compose.docker_compose_deployment_yml
|
52
62
|
end
|
53
63
|
|
54
64
|
def puma
|
65
|
+
return unless build?('puma.rb')
|
55
66
|
return nil unless @env.web_server == 'puma'
|
56
67
|
|
57
68
|
content = template('puma.rb')
|
@@ -60,6 +71,7 @@ module Orchestration
|
|
60
71
|
end
|
61
72
|
|
62
73
|
def unicorn
|
74
|
+
return unless build?('unicorn.rb')
|
63
75
|
return nil unless @env.web_server == 'unicorn'
|
64
76
|
|
65
77
|
content = template('unicorn.rb')
|
@@ -70,6 +82,7 @@ module Orchestration
|
|
70
82
|
end
|
71
83
|
|
72
84
|
def database_yml
|
85
|
+
return unless build?('database.yml')
|
73
86
|
return unless defined?(::ActiveRecord)
|
74
87
|
|
75
88
|
adapter = DockerCompose::ComposeConfiguration.database_adapter_name
|
@@ -79,28 +92,35 @@ module Orchestration
|
|
79
92
|
end
|
80
93
|
|
81
94
|
def mongoid_yml
|
95
|
+
return unless build?('mongoid.yml')
|
82
96
|
return unless defined?(::Mongoid)
|
83
97
|
|
84
98
|
service_config('mongoid.yml', Services::Mongo::Configuration)
|
85
99
|
end
|
86
100
|
|
87
101
|
def rabbitmq_yml
|
102
|
+
return unless build?('rabbitmq.yml')
|
88
103
|
return unless defined?(::Bunny)
|
89
104
|
|
90
105
|
service_config('rabbitmq.yml', Services::RabbitMQ::Configuration)
|
91
106
|
end
|
92
107
|
|
93
108
|
def redis_yml
|
109
|
+
return unless build?('redis.yml')
|
94
110
|
return unless defined?(::Redis)
|
95
111
|
|
96
112
|
service_config('redis.yml', Services::Redis::Configuration)
|
97
113
|
end
|
98
114
|
|
99
115
|
def env
|
116
|
+
return unless build?('.env')
|
117
|
+
|
100
118
|
simple_copy('env', @env.root.join('.env'), overwrite: false)
|
101
119
|
end
|
102
120
|
|
103
121
|
def gitignore
|
122
|
+
return unless build?('.gitignore')
|
123
|
+
|
104
124
|
path = @env.root.join('.gitignore')
|
105
125
|
globs = %w[.build/ .deploy/ Gemfile Gemfile.lock docker-compose.local.yml]
|
106
126
|
lines = %w[orchestration/.sidecar .env deploy.tar] + globs.map do |line|
|
@@ -112,6 +132,13 @@ module Orchestration
|
|
112
132
|
|
113
133
|
private
|
114
134
|
|
135
|
+
def build?(filename)
|
136
|
+
return true unless ENV.key?('build')
|
137
|
+
return true if ENV.fetch('build') == filename
|
138
|
+
|
139
|
+
false
|
140
|
+
end
|
141
|
+
|
115
142
|
def t(key)
|
116
143
|
I18n.t("orchestration.#{key}")
|
117
144
|
end
|
@@ -2,18 +2,25 @@ FROM ruby:<%= ruby_version %>
|
|
2
2
|
ARG BUNDLE_BITBUCKET__ORG
|
3
3
|
ARG BUNDLE_GITHUB__COM
|
4
4
|
ARG GIT_COMMIT
|
5
|
-
|
6
|
-
|
5
|
+
ENV NODE_MAJOR=20
|
6
|
+
RUN apt-get update \
|
7
7
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
8
|
-
nodejs \
|
9
8
|
gosu \
|
10
9
|
sendmail \
|
10
|
+
cron \
|
11
|
+
ca-certificates \
|
12
|
+
curl \
|
13
|
+
gnupg \
|
14
|
+
&& mkdir -p /etc/apt/keyrings \
|
15
|
+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
|
16
|
+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
|
17
|
+
&& apt-get update \
|
18
|
+
&& apt-get install nodejs \
|
11
19
|
&& rm -rf /var/lib/apt/lists/* \
|
12
20
|
&& gem install bundler \
|
13
21
|
&& mkdir /app<%if defined?(Webpacker) %> \
|
14
22
|
&& curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash \
|
15
23
|
&& . /root/.bashrc \
|
16
|
-
&& nvm install 14.16.0 \
|
17
24
|
&& npm config set user 0 \
|
18
25
|
&& npm config set unsafe-perm true \
|
19
26
|
&& npm install -g yarn<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orchestration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Farrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: database_url
|