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 +4 -4
- data/lib/composer.rb +6 -6
- data/lib/symfony/doctrine.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ce374507d06bcfcbcf8780fc08ecf2bff34a1fc
|
4
|
+
data.tar.gz: 47183355f1076233adadf4793e10df8e8bbfc7cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
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
|
data/lib/symfony/doctrine.rb
CHANGED
@@ -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
|