dockerize-stack 0.0.2 → 0.0.3
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 +4 -4
- data/README.md +1 -1
- data/lib/rails/dockerize_rails.rb +13 -2
- data/lib/rails/templates/Dockerfile.erb +9 -0
- data/lib/rails/templates/{dockerignore → dockerignore.erb} +0 -0
- data/lib/rails/templates/{entrypoint.sh → entrypoint.sh.erb} +3 -0
- data/lib/rails/templates/id_rsa.sample +1 -0
- data/lib/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 823ea680469c3eddd93d269e409b046814cea274
|
4
|
+
data.tar.gz: 76b84ce3dcc02fea9d4aea187d50909660282c7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56f3afc47e86c54b3e3a6ef95bae47aacee460c9870484491011e9ff221d811bac67bc523489e0dce8c5aeee44b36bf04612275521768dcbfa1e5dc4d6356a65
|
7
|
+
data.tar.gz: 7bd94a0df553a9acbf037fd0214f99c7306299ea97024eac76c5765c7f8ca56b06277b0ddb864471c19b2889ab3b475847c0d8dbe986738477477352c7dca4e6
|
data/README.md
CHANGED
@@ -44,4 +44,4 @@ example files generate:
|
|
44
44
|
- [ ] Add phoenix generator
|
45
45
|
- [ ] Solve use rails generator in container
|
46
46
|
- [ ] Add integrations with all database types rails new supported ([mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc])
|
47
|
-
- [
|
47
|
+
- [x] Integrate Build with private repository in the generator
|
@@ -13,14 +13,25 @@ class DockerizeRails < Thor
|
|
13
13
|
@ruby_version = ask("Ruby Version (default 2.4.3):")
|
14
14
|
@ruby_version = "2.4.3" if @ruby_version == ""
|
15
15
|
@database = ask("What is your Database?", limited_to: ["mysql", "postgresql"])
|
16
|
+
@id_rsa = ask("Would you need your id_rsa file to connect with GitHub? Type yes or no (default no):")
|
17
|
+
@id_rsa = "no" if @id_rsa == ""
|
16
18
|
|
17
19
|
template "templates/Dockerfile.erb", "docker/development/Dockerfile"
|
18
|
-
template "templates/entrypoint.sh", "docker/development/entrypoint.sh"
|
20
|
+
template "templates/entrypoint.sh.erb", "docker/development/entrypoint.sh"
|
19
21
|
template "templates/docker-compose.yml.erb", "docker-compose.yml"
|
20
22
|
template "templates/database-docker.yml.erb", "config/database-docker.yml"
|
21
|
-
template "templates/dockerignore", ".dockerignore"
|
23
|
+
template "templates/dockerignore.erb", ".dockerignore"
|
24
|
+
|
22
25
|
append_to_file '.gitignore', "
|
23
26
|
volumes"
|
27
|
+
if @id_rsa == 'yes'
|
28
|
+
template "templates/id_rsa.sample", "docker/development/id_rsa.sample"
|
29
|
+
append_to_file '.gitignore', "
|
30
|
+
docker/development/id_rsa"
|
31
|
+
append_to_file '.gitignore', "
|
32
|
+
docker/development/id_rsa.sample"
|
33
|
+
end
|
34
|
+
|
24
35
|
puts "Update your database.yml based in database-docker.yml"
|
25
36
|
end
|
26
37
|
|
@@ -39,3 +39,12 @@ RUN apt-get update && apt-get install yarn
|
|
39
39
|
RUN mkdir /app
|
40
40
|
WORKDIR /app
|
41
41
|
ADD . /app
|
42
|
+
|
43
|
+
<% if @id_rsa == 'yes' %>
|
44
|
+
RUN mkdir /root/.ssh
|
45
|
+
RUN cp id_rsa /root/.ssh/id_rsa
|
46
|
+
# RUN chmod 0644 /root/.ssh/id_rsa
|
47
|
+
RUN touch /root/.ssh/known_hosts
|
48
|
+
RUN eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_rsa && ssh-add -l && ssh-add -L && echo "Host github.com\n\tIdentityFile ~/.ssh/id_rsa" >> /root/.ssh/config
|
49
|
+
RUN ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
|
50
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Replace this file with your id_rsa file
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockerize-stack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Savignano
|
@@ -39,8 +39,9 @@ files:
|
|
39
39
|
- lib/rails/templates/Dockerfile.erb
|
40
40
|
- lib/rails/templates/database-docker.yml.erb
|
41
41
|
- lib/rails/templates/docker-compose.yml.erb
|
42
|
-
- lib/rails/templates/dockerignore
|
43
|
-
- lib/rails/templates/entrypoint.sh
|
42
|
+
- lib/rails/templates/dockerignore.erb
|
43
|
+
- lib/rails/templates/entrypoint.sh.erb
|
44
|
+
- lib/rails/templates/id_rsa.sample
|
44
45
|
- lib/version.rb
|
45
46
|
homepage: https://github.com/MiguelSavignano/dockerize-stack
|
46
47
|
licenses:
|