railsdock 0.3.1 → 0.4.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 +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +2 -2
- data/example-app/Gemfile.lock +2 -2
- data/example-app/yarn.lock +6 -6
- data/lib/railsdock/commands/install.rb +0 -7
- data/lib/railsdock/templates/install/default/default.env.erb +1 -13
- data/lib/railsdock/templates/install/default/docker-compose.yml.erb +5 -5
- data/lib/railsdock/templates/install/default/entrypoint.sh +5 -3
- data/lib/railsdock/templates/install/memcached/docker-compose.yml.erb +1 -3
- data/lib/railsdock/templates/install/mysql/docker-compose.yml.erb +2 -4
- data/lib/railsdock/templates/install/postgres/docker-compose.yml.erb +1 -3
- data/lib/railsdock/templates/install/redis/docker-compose.yml.erb +1 -3
- data/lib/railsdock/version.rb +1 -1
- metadata +2 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67c7ccaf161e8140b8f46ab84a668c483ad36b89e9ea0151ca1c142d99d8bca0
|
|
4
|
+
data.tar.gz: a693a9fa194faf80019f73e034ad026b8c2d441fa98066df35fa7b5d4296a847
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 904b9176b2d00d1d52f29a819f40da561daf3ea106f51e37bdd2466708a317477d232c7bd37ad07b050479baa06a8ad52ae85ad591c36cce194a6a6f4d677117
|
|
7
|
+
data.tar.gz: 1be2282f4a931a2cc809102809fac6e1be4facf864f0871cc7cf94fcd8e4abd90c947fb9c8e69e84beead0ce1b348bdadc2b0282318a29c894e711e6ce80fdd8
|
data/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
11
11
|
### Fixed
|
|
12
12
|
### Security
|
|
13
13
|
|
|
14
|
+
## [0.4.0] - 08-08-2020
|
|
15
|
+
### Changed
|
|
16
|
+
- default to exposing only necessary ports [PR26](https://github.com/hintmedia/railsdock/pull/26)
|
|
17
|
+
- move most config to compose file [PR28](https://github.com/hintmedia/railsdock/pull/28)
|
|
18
|
+
### Fixed
|
|
19
|
+
- handle new apps with no schema.rb or structure.sql [I22](https://github.com/hintmedia/railsdock/issues/22) [PR25](https://github.com/hintmedia/railsdock/pull/25)
|
|
20
|
+
|
|
14
21
|
## [0.3.1] - 07-20-2020
|
|
15
22
|
### Fixed
|
|
16
23
|
- command in docker-compose template [PR21](https://github.com/hintmedia/railsdock/pull/21)
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
railsdock (0.
|
|
4
|
+
railsdock (0.4.0)
|
|
5
5
|
bundler (~> 2.0)
|
|
6
6
|
pastel (~> 0.7.2)
|
|
7
7
|
railties (>= 4.2, < 6.1)
|
|
@@ -44,7 +44,7 @@ GEM
|
|
|
44
44
|
diff-lcs (1.3)
|
|
45
45
|
equatable (0.6.1)
|
|
46
46
|
erubi (1.9.0)
|
|
47
|
-
i18n (1.8.
|
|
47
|
+
i18n (1.8.5)
|
|
48
48
|
concurrent-ruby (~> 1.0)
|
|
49
49
|
loofah (2.6.0)
|
|
50
50
|
crass (~> 1.0.2)
|
data/example-app/Gemfile.lock
CHANGED
|
@@ -94,7 +94,7 @@ GEM
|
|
|
94
94
|
pg (1.2.3)
|
|
95
95
|
puma (4.3.5)
|
|
96
96
|
nio4r (~> 2.0)
|
|
97
|
-
rack (2.2.
|
|
97
|
+
rack (2.2.3)
|
|
98
98
|
rack-proxy (0.6.5)
|
|
99
99
|
rack
|
|
100
100
|
rack-test (1.1.0)
|
|
@@ -172,7 +172,7 @@ GEM
|
|
|
172
172
|
semantic_range (>= 2.3.0)
|
|
173
173
|
websocket-driver (0.7.1)
|
|
174
174
|
websocket-extensions (>= 0.1.0)
|
|
175
|
-
websocket-extensions (0.1.
|
|
175
|
+
websocket-extensions (0.1.5)
|
|
176
176
|
zeitwerk (2.3.0)
|
|
177
177
|
|
|
178
178
|
PLATFORMS
|
data/example-app/yarn.lock
CHANGED
|
@@ -4177,9 +4177,9 @@ lodash.uniq@^4.5.0:
|
|
|
4177
4177
|
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
|
|
4178
4178
|
|
|
4179
4179
|
lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5, lodash@~4.17.10:
|
|
4180
|
-
version "4.17.
|
|
4181
|
-
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.
|
|
4182
|
-
integrity sha512-
|
|
4180
|
+
version "4.17.19"
|
|
4181
|
+
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
|
|
4182
|
+
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
|
|
4183
4183
|
|
|
4184
4184
|
loglevel@^1.6.8:
|
|
4185
4185
|
version "1.6.8"
|
|
@@ -7588,9 +7588,9 @@ websocket-driver@>=0.5.1:
|
|
|
7588
7588
|
websocket-extensions ">=0.1.1"
|
|
7589
7589
|
|
|
7590
7590
|
websocket-extensions@>=0.1.1:
|
|
7591
|
-
version "0.1.
|
|
7592
|
-
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.
|
|
7593
|
-
integrity sha512-
|
|
7591
|
+
version "0.1.4"
|
|
7592
|
+
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42"
|
|
7593
|
+
integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==
|
|
7594
7594
|
|
|
7595
7595
|
which-module@^2.0.0:
|
|
7596
7596
|
version "2.0.0"
|
|
@@ -54,7 +54,6 @@ module Railsdock
|
|
|
54
54
|
inject_driver_config(service)
|
|
55
55
|
append_erb_to_compose_file(service)
|
|
56
56
|
file.inject_into_file('./docker-compose.yml', "\n #{service}:", after: "\nvolumes:")
|
|
57
|
-
append_service_config_to_env(service)
|
|
58
57
|
if type == :database
|
|
59
58
|
copy_db_yml("#{BASE_TEMPLATE_DIR}/#{service}/database.yml.erb")
|
|
60
59
|
inject_db_script_into_entrypoint(service)
|
|
@@ -129,12 +128,6 @@ module Railsdock
|
|
|
129
128
|
file.inject_into_file('./docker-compose.yml', " - #{service}\n", after: "depends_on:\n")
|
|
130
129
|
end
|
|
131
130
|
|
|
132
|
-
def append_service_config_to_env(service)
|
|
133
|
-
file.safe_append_to_file('./.env') do
|
|
134
|
-
::File.binread("#{BASE_TEMPLATE_DIR}/#{service}/#{service}.env")
|
|
135
|
-
end
|
|
136
|
-
end
|
|
137
|
-
|
|
138
131
|
def prompt_for_dockerfile_directory
|
|
139
132
|
prompt.ask('Where would you like your docker container configuration files to live?') do |q|
|
|
140
133
|
q.default './docker/'
|
|
@@ -13,19 +13,7 @@ COMPOSE_PATH_SEPARATOR=<%= is_windows? ? ';' : ':' %>
|
|
|
13
13
|
# Define the prefix of container names. This is useful when there are multiple projects using railsdock
|
|
14
14
|
COMPOSE_PROJECT_NAME=<%= app_name %>
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
######################### Containers Customization ############################
|
|
18
|
-
###############################################################################
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### RUBY ######################################################################
|
|
22
|
-
# Select a Ruby Version of the Ruby container. Accepted values: 2.2.x-2.7.x
|
|
16
|
+
### User Configuration ######################################################
|
|
23
17
|
|
|
24
|
-
RAILSDOCK_RUBY_VERSION=<%= ruby_version %>
|
|
25
|
-
BUNDLE_JOBS=10
|
|
26
|
-
BUNDLE_RETRY=3
|
|
27
|
-
RAILS_SERVER_HOST_PORT=3000
|
|
28
18
|
RUBY_UID=<%= uid %>
|
|
29
19
|
RUBY_GID=<%= uid %>
|
|
30
|
-
# Select a Node Version for the Ruby container. Accepted values: 8-13
|
|
31
|
-
RAILSDOCK_NODE_VERSION=12
|
|
@@ -4,10 +4,10 @@ x-ruby: &ruby-base
|
|
|
4
4
|
build:
|
|
5
5
|
context: <%= dockerfile_dir %>ruby
|
|
6
6
|
args:
|
|
7
|
-
- RAILSDOCK_RUBY_VERSION
|
|
8
|
-
- RAILSDOCK_NODE_VERSION
|
|
9
|
-
- RAILSDOCK_BUNDLE_JOBS
|
|
10
|
-
- RAILSDOCK_BUNDLE_RETRY
|
|
7
|
+
- RAILSDOCK_RUBY_VERSION=<%= ruby_version %>
|
|
8
|
+
- RAILSDOCK_NODE_VERSION=12
|
|
9
|
+
- RAILSDOCK_BUNDLE_JOBS=10
|
|
10
|
+
- RAILSDOCK_BUNDLE_RETRY=3
|
|
11
11
|
- RUBY_UID=${RUBY_UID}
|
|
12
12
|
- RUBY_GID=${RUBY_GID}
|
|
13
13
|
volumes:
|
|
@@ -36,4 +36,4 @@ services:
|
|
|
36
36
|
command: bundle exec rails server -p 3000 -b '0.0.0.0'
|
|
37
37
|
entrypoint: ./docker/ruby/entrypoint.sh
|
|
38
38
|
ports:
|
|
39
|
-
- "
|
|
39
|
+
- "3000:3000"
|
|
@@ -13,6 +13,7 @@ function lock_setup { mkdir -p $APP_TEMP_PATH && touch $APP_SETUP_LOCK; }
|
|
|
13
13
|
function unlock_setup { rm -rf $APP_SETUP_LOCK; }
|
|
14
14
|
function wait_setup { echo "Waiting for app setup to finish..."; sleep $APP_SETUP_WAIT; }
|
|
15
15
|
function check_host { ping -q -c1 $HOST_DOMAIN > /dev/null 2>&1; }
|
|
16
|
+
function schema_file_exists { [[ -e "db/schema.rb" || -e "db/structure.sql" ]]; }
|
|
16
17
|
|
|
17
18
|
# 2: 'Unlock' the setup process if the script exits prematurely:
|
|
18
19
|
trap unlock_setup HUP INT QUIT KILL TERM EXIT
|
|
@@ -41,9 +42,10 @@ then
|
|
|
41
42
|
|
|
42
43
|
yarn install
|
|
43
44
|
# 9: Setup the database if it doesn't
|
|
44
|
-
if !
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
if ! schema_file_exists; then
|
|
46
|
+
bundle exec rake db:create && bundle exec rake db:migrate
|
|
47
|
+
elif ! rake db:migrate 2> /dev/null; then
|
|
48
|
+
bundle exec rake db:setup
|
|
47
49
|
fi
|
|
48
50
|
|
|
49
51
|
# check if the docker host is running on mac or windows
|
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
build:
|
|
5
5
|
context: <%= dockerfile_dir %>mysql
|
|
6
6
|
args:
|
|
7
|
-
- MYSQL_VERSION
|
|
7
|
+
- MYSQL_VERSION=5.7
|
|
8
8
|
environment:
|
|
9
|
-
- MYSQL_ROOT_PASSWORD
|
|
10
|
-
ports:
|
|
11
|
-
- "${MYSQL_HOST_PORT}:3306"
|
|
9
|
+
- MYSQL_ROOT_PASSWORD=Password1
|
|
12
10
|
volumes:
|
|
13
11
|
- mysql:/var/lib/mysql
|
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
build:
|
|
5
5
|
context: <%= dockerfile_dir %>postgres
|
|
6
6
|
args:
|
|
7
|
-
- POSTGRES_VERSION
|
|
7
|
+
- POSTGRES_VERSION=12
|
|
8
8
|
environment:
|
|
9
9
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
|
10
|
-
ports:
|
|
11
|
-
- "${POSTGRES_HOST_PORT}:5432"
|
|
12
10
|
volumes:
|
|
13
11
|
- postgres:/var/lib/postgresql/data
|
data/lib/railsdock/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: railsdock
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kyle Boe
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2020-
|
|
12
|
+
date: 2020-08-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: railties
|
|
@@ -317,18 +317,14 @@ files:
|
|
|
317
317
|
- lib/railsdock/templates/install/default/entrypoint.sh
|
|
318
318
|
- lib/railsdock/templates/install/memcached/Dockerfile
|
|
319
319
|
- lib/railsdock/templates/install/memcached/docker-compose.yml.erb
|
|
320
|
-
- lib/railsdock/templates/install/memcached/memcached.env
|
|
321
320
|
- lib/railsdock/templates/install/mysql/Dockerfile
|
|
322
321
|
- lib/railsdock/templates/install/mysql/database.yml.erb
|
|
323
322
|
- lib/railsdock/templates/install/mysql/docker-compose.yml.erb
|
|
324
|
-
- lib/railsdock/templates/install/mysql/mysql.env
|
|
325
323
|
- lib/railsdock/templates/install/postgres/Dockerfile
|
|
326
324
|
- lib/railsdock/templates/install/postgres/database.yml.erb
|
|
327
325
|
- lib/railsdock/templates/install/postgres/docker-compose.yml.erb
|
|
328
|
-
- lib/railsdock/templates/install/postgres/postgres.env
|
|
329
326
|
- lib/railsdock/templates/install/redis/Dockerfile
|
|
330
327
|
- lib/railsdock/templates/install/redis/docker-compose.yml.erb
|
|
331
|
-
- lib/railsdock/templates/install/redis/redis.env
|
|
332
328
|
- lib/railsdock/version.rb
|
|
333
329
|
- railsdock.gemspec
|
|
334
330
|
- railsdock.png
|