dckerize 0.5.7 → 0.6.0

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: 758de78e30331b73f2914b2f8bf34632c20cbbf7
4
- data.tar.gz: 228ca4e3a431847ff1b641801e95cd1ff54e4d15
3
+ metadata.gz: 2a9267f30655c755ba755ef3be94ff282a2ee16a
4
+ data.tar.gz: d1a189e2744643a8597b8f0027a4e4437ebb414a
5
5
  SHA512:
6
- metadata.gz: 86cd4dbf6f0583aff3a96e8bf4082d42b53db625ada117833634938793679f4825c4eca538ff1f422750ee3a519dcbf6cdf4de497fd8888474ed7769ecf556fe
7
- data.tar.gz: e90dc73c01a1c8465f383febc79f82c3ed96899c2b47a15cbf3e35619d31772b77f390bad1dc333568ffdc7822899a1e04e15fe18db4424dc1359c2af16252bd
6
+ metadata.gz: e75dc142319750689ba39db363817aad659cfaa64d313ad3c498721afd86ed2507cfd3da2a6b1245a0c5f106ab2fd045c67a797b9dff95e91065fd704a534b82
7
+ data.tar.gz: 9c6ea5c8d4cf3cf6639aa89877c49db53af823f5939932aaed43affc2a36cd1264ce44003845fcc797b0b87fb796bd81a1994d9a764c41b621dffaa3bdce8f45
data/README.md CHANGED
@@ -148,6 +148,10 @@ And etc.
148
148
  The nginx container is mapping its port 80 with the port 80 of the guest host, and since we're declaring a private network in our Vagranfile
149
149
  you can access your application by visiting http://192.168.50.4.
150
150
 
151
+ ### Mounting extra files to running containers
152
+
153
+ Useful for adding sql dumps to your db container (not the data one). In this case you should have the file in your shared folder and send it from your host in vagrant to your running container. There are several ways to accomplish this, but the simplest way is described [here](http://stackoverflow.com/a/24805696).
154
+
151
155
  ## TODO
152
156
 
153
157
  - [x] Support for more services (redis, elasticsearch)
@@ -39,8 +39,14 @@ module Dckerize
39
39
  end
40
40
 
41
41
  def up
42
- FileUtils.mkdir_p('conf')
42
+
43
+ # create vagrant and conf folders only if don't exist
44
+ raise Dckerize::Runner::VAGRANT_FOLDER_EXISTS if File.exists?('vagrant')
45
+ raise Dckerize::Runner::CONF_FOLDER_EXISTS if File.exists?('conf')
46
+ raise Dckerize::Runner::DOCKERFILE_EXISTS if File.exists?('Dockerfile')
47
+ raise Dckerize::Runner::DOCKERCOMPOSE_EXISTS if File.exists?('docker-compose.yml')
43
48
  FileUtils.mkdir_p('vagrant')
49
+ FileUtils.mkdir_p('conf')
44
50
 
45
51
  create_from_template('Vagrantfile.erb', 'vagrant/Vagrantfile')
46
52
  create_from_template('Dockerfile.erb', 'Dockerfile')
@@ -1,9 +1,13 @@
1
1
  module Dckerize
2
2
  class Runner
3
3
 
4
- VALID_DBS = ['mysql', 'postgres', 'mongo']
5
- VALID_EXTRAS = ['elasticsearch', 'redis', 'memcached']
6
- ERROR_MESSAGE = 'USAGE: dckerize up APP_NAME --database=<mysql|postgres|mongo> [--extras=elasticsearch,redis,memcached]'
4
+ VALID_DBS = ['mysql', 'postgres', 'mongo']
5
+ VALID_EXTRAS = ['elasticsearch', 'redis', 'memcached']
6
+ ERROR_MESSAGE = 'USAGE: dckerize up APP_NAME --database=<mysql|postgres|mongo> [--extras=elasticsearch,redis,memcached]'
7
+ VAGRANT_FOLDER_EXISTS = 'ERROR: vagrant folder already exists.'
8
+ CONF_FOLDER_EXISTS = 'ERROR: conf folder already exists.'
9
+ DOCKERFILE_EXISTS = 'ERROR: Dockerfile already exists.'
10
+ DOCKERCOMPOSE_EXISTS = 'ERROR: docker-compose already exists.'
7
11
  def initialize(options)
8
12
  @options = options
9
13
  end
@@ -1,3 +1,3 @@
1
1
  module Dckerize
2
- VERSION = "0.5.7"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dckerize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Acuña
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-26 00:00:00.000000000 Z
11
+ date: 2015-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -103,8 +103,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  requirements: []
105
105
  rubyforge_project:
106
- rubygems_version: 2.4.6
106
+ rubygems_version: 2.4.4
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Supercharged Rails development using Docker containers.
110
110
  test_files: []
111
+ has_rdoc: