docker-build 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2a8b4a4727f5e9dae3dc5030ea7316df91108bd
4
- data.tar.gz: 6f582433ef23546f12910be27d5e4cbb7798161d
3
+ metadata.gz: 7ce374507d06bcfcbcf8780fc08ecf2bff34a1fc
4
+ data.tar.gz: 47183355f1076233adadf4793e10df8e8bbfc7cd
5
5
  SHA512:
6
- metadata.gz: 9fbbe0abe9b70209b8bb5e9314e394bde889cb6a38a21a0b0659db21cb5db2309dac17446114bf9f867975ac97ff8a922ac38f630c0deb9640ae9660a6d7a6dd
7
- data.tar.gz: dd8e4eab7e326353874f89776fc98e8ffc498452028dc1be971fd424d7ee955b9bb44e314a9cc4f33047df976c5465ed11dded8b5ea504bfee2749c1e5adb482
6
+ metadata.gz: 6b1f0a72a5955f9f4167485f19cbfcfdea07528248dfc24852a8769d96d38ce668a97dbcacc0898c0470f6320387360fa09232290b1fb164338d732f9a1de34d
7
+ data.tar.gz: 18dcc49265293add1d0ef5aebdd8940eef7d5125820a6c8321b5e5c287be61fb551afb2205505bd90bb396872352df111a87afced0ac8d7e8d3373933849f883
data/lib/composer.rb CHANGED
@@ -1,24 +1,24 @@
1
1
  class Composer
2
2
 
3
- def self.development(env)
3
+ def self.development(data_container, env)
4
4
  puts '-- Installing Composer development dependencies'
5
- docker_command = self.get_docker_command(env) + 'install --verbose --profile'
5
+ docker_command = self.get_docker_command(data_container, env) + 'install --verbose --profile'
6
6
  puts '---- Running: ' << docker_command
7
7
  fail 'Composer development installation failed' unless system docker_command
8
8
  end
9
9
 
10
- def self.production(env)
10
+ def self.production(data_container, env)
11
11
  puts '---- Installing Composer production dependencies'
12
- docker_command = self.get_docker_command(env) + 'install --no-dev --optimize-autoloader --no-interaction --verbose --profile'
12
+ docker_command = self.get_docker_command(data_container, env) + 'install --no-dev --optimize-autoloader --no-interaction --verbose --profile'
13
13
  puts '---- Running: ' << docker_command
14
14
  fail 'Composer production installation failed' unless system docker_command
15
15
  end
16
16
 
17
17
  private
18
- def self.get_docker_command(env)
18
+ def self.get_docker_command(data_container, env)
19
19
  puts '---- Launching Composer container'
20
20
  docker_env_vars = env.map{|k,v| "#{k}=#{v}"}.join(' --env ')
21
- docker_command = 'docker run --rm -v `pwd`:/app '
21
+ docker_command = "docker run --rm --volumes-from #{data_container} "
22
22
  if docker_env_vars.length > 5
23
23
  docker_command << "--env #{docker_env_vars} "
24
24
  end
@@ -11,7 +11,9 @@ class Doctrine
11
11
 
12
12
  def self.run_migrations(data_container, db_container = nil)
13
13
  puts '-- Running Symfony Doctrine migrations'
14
-
14
+ docker_command = self.get_docker_command(data_container, db_container) << 'doctine:migrations:migrate'
15
+ puts '---- Running: ' << docker_command
16
+ fail 'Database migrations failed!' unless system docker_command
15
17
  end
16
18
 
17
19
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-build
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - VJ Patel