orchestration 0.2.7 → 0.2.8

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: 7371c8d7691770e73a17feb1c67095e5ff6d4f68
4
- data.tar.gz: 6438dc68182cf8673c25137ac3b9676f69284fe7
3
+ metadata.gz: 776a11504e5b33803ff0375a1d168b08567b8e97
4
+ data.tar.gz: 52a848059b2fb338222b72cc00590f6d3760ae13
5
5
  SHA512:
6
- metadata.gz: '0888c846560554ea5b5d767b764af902c60902344501b18786283d033050d96f76a6a4ecc5906da48c00e959c22a3f8d1c318a1c3ee25651538fad932285d841'
7
- data.tar.gz: 313e67474a01c8a3f9014fa914af1be67df44c94ec947b5dfd5c62bf62a109cd06964117764c6193cce940d079bf06e2a579b98926d7e2dd6fc5e97ac24533a1
6
+ metadata.gz: a549fe23607afe2b5b0e46e28956a64f0dde1f43fcd900b6458cad298a0f05073c6aa1899908aaf8e978de940beb19414d3374471b2edfe8a4c1729ae50b97b0
7
+ data.tar.gz: be3f1f287527ae67f1ca236aba5d1e2acd68cf34136916943c6a284e634330b1bea89c81aabcc6b3b5936c90e882f4e33fbb4cbd18cfc80d998d2033f03ea1de
data/README.md CHANGED
@@ -18,7 +18,7 @@ Containers are automatically created for the following dependencies:
18
18
  Add this line to your application's Gemfile:
19
19
 
20
20
  ```ruby
21
- gem 'orchestration', '~> 0.2.7'
21
+ gem 'orchestration', '~> 0.2.8'
22
22
  ```
23
23
 
24
24
  And then build your bundle:
@@ -40,6 +40,10 @@ module Orchestration
40
40
  YAML.safe_load(File.read(docker_compose_configuration_path))
41
41
  end
42
42
 
43
+ def docker_compose_config?
44
+ docker_compose_configuration_path.file?
45
+ end
46
+
43
47
  def application_name
44
48
  Rails.application.class.parent.name.underscore
45
49
  end
@@ -49,11 +49,11 @@ module Orchestration
49
49
  def gitignore
50
50
  path = @env.root.join('.gitignore')
51
51
  entries = [
52
- 'docker/.build/context.tar.gz',
52
+ 'docker/.build/',
53
53
  'docker/Gemfile',
54
54
  'docker/Gemfile.lock',
55
55
  'docker/*.gemspec'
56
- ].map { |entry| "#{entry} # Orchestration" }
56
+ ]
57
57
  ensure_lines_in_file(path, entries)
58
58
  end
59
59
 
@@ -37,7 +37,7 @@ module Orchestration
37
37
  database = settings.fetch('database')
38
38
  username = settings.fetch('username')
39
39
  password = settings.fetch('password')
40
- port = settings.fetch('port')
40
+ port = DockerCompose::DatabaseService::PORT
41
41
  host = Database::Configuration.service_name
42
42
 
43
43
  "#{scheme}://#{username}:#{password}@#{host}:#{port}/#{database}"
@@ -37,6 +37,7 @@ module Orchestration
37
37
  'scheme' => base['adapter'],
38
38
  'port' => DockerCompose::DatabaseService::PORT
39
39
  )
40
+ @settings.merge!('port' => local_port) if @env.docker_compose_config?
40
41
  end
41
42
 
42
43
  def parse(content)
@@ -2,10 +2,9 @@ FROM ruby:<%= ruby_version %>
2
2
  ARG BUNDLE_BITBUCKET__ORG
3
3
  ARG BUNDLE_GITHUB__COM
4
4
  RUN apt-get update \
5
- && apt-get install -y node.js gosu \
5
+ && apt-get install -y node.js gosu sendmail \
6
6
  && rm -rf /var/lib/apt/lists/* \
7
7
  && gem install bundler \
8
- && gem install unicorn \
9
8
  && mkdir /application
10
9
  WORKDIR /application
11
10
  COPY Gemfile Gemfile.lock ./
@@ -26,6 +26,12 @@ stop:
26
26
  @${COMPOSE} down
27
27
  @echo "All containers stopped."
28
28
 
29
+ start-application:
30
+ @echo "Starting containers..."
31
+ @${COMPOSE} up -d --scale application=$${INSTANCES:-1} nginx-proxy application
32
+ @make wait-nginx-proxy wait-application
33
+ @echo "Application started."
34
+
29
35
  ### Database utility commands ###
30
36
 
31
37
  migrate: wait-database
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orchestration
4
- VERSION = '0.2.7'
4
+ VERSION = '0.2.8'
5
5
  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.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-12 00:00:00.000000000 Z
11
+ date: 2018-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize