jinda 0.6.4 → 0.6.5
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/lib/generators/jinda/templates/Dockerfile +24 -0
- data/lib/generators/jinda/templates/app/views/jinda/index.html.haml +1 -1
- data/lib/generators/jinda/templates/config/mongoid.yml-docker +182 -0
- data/lib/generators/jinda/templates/config/mongoid.yml-localhost +182 -0
- data/lib/generators/jinda/templates/docker-compose.yml +16 -0
- data/lib/generators/jinda/templates/entrypoint.sh +12 -0
- data/lib/jinda/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '042968bc00874bfb253e1896812521a4805d587be5470ea5f8149a32bb301e88'
|
4
|
+
data.tar.gz: 8d1cf09efbefda3e8beb9d7023d7aee88cafe86a22ee0d4b9de2356cd494a8a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3090a6c9d17d67bc8f4a01f5274703346104a5fd30020dd8176ed8a56c998c046e290af3fa1b1499f89da8e7472df86ff81220a83bef65962b6918653e9bfc7
|
7
|
+
data.tar.gz: fa18290337837f65b553de8a27901a706ea7b6086b884c958f0158f91d3dd872549390b9c9f8d7d574e91fd3226df761ee419cc0f8f16212709f6733e5598325
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# https://docs.docker.com/compose/rails/
|
2
|
+
FROM ruby:2.6.3
|
3
|
+
RUN apt-get update -qq
|
4
|
+
RUN mkdir /myapp
|
5
|
+
WORKDIR /myapp
|
6
|
+
COPY Gemfile /myapp/Gemfile
|
7
|
+
# COPY Gemfile.lock /myapp/Gemfile.lock
|
8
|
+
|
9
|
+
RUN bundle install
|
10
|
+
COPY . /myapp
|
11
|
+
|
12
|
+
# Set Rails environment to production
|
13
|
+
# ENV RAILS_ENV production
|
14
|
+
# RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
|
15
|
+
# && apt install -y nodejs
|
16
|
+
|
17
|
+
# Add a script to be executed every time the container starts.
|
18
|
+
COPY entrypoint.sh /usr/bin/
|
19
|
+
RUN chmod +x /usr/bin/entrypoint.sh
|
20
|
+
ENTRYPOINT ["entrypoint.sh"]
|
21
|
+
EXPOSE 3000
|
22
|
+
|
23
|
+
# Start the main process.
|
24
|
+
CMD ["rails", "server", "-b", "0.0.0.0"]
|
@@ -33,7 +33,7 @@
|
|
33
33
|
%div.inner
|
34
34
|
%b Installation
|
35
35
|
%ul
|
36
|
-
%li add gem 'jinda', '0.6.
|
36
|
+
%li add gem 'jinda', '0.6.5' to Gemfile then $ bundle
|
37
37
|
%li rails generate jinda:install, then bundle
|
38
38
|
%li rails generate jinda:config
|
39
39
|
%li rails jinda:seed, will create initial user:password admin:secret
|
@@ -0,0 +1,182 @@
|
|
1
|
+
development:
|
2
|
+
# Configure available database clients. (required)
|
3
|
+
clients:
|
4
|
+
# Defines the default client. (required)
|
5
|
+
default:
|
6
|
+
# Mongoid can connect to a URI accepted by the driver:
|
7
|
+
# uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development
|
8
|
+
|
9
|
+
# Otherwise define the parameters separately.
|
10
|
+
# This defines the name of the default database that Mongoid can connect to.
|
11
|
+
# (required).
|
12
|
+
database: shop263603_development
|
13
|
+
# Provides the hosts the default client can connect to. Must be an array
|
14
|
+
# of host:port pairs. (required)
|
15
|
+
hosts:
|
16
|
+
# - localhost:27017
|
17
|
+
- mongodb
|
18
|
+
options:
|
19
|
+
# Note that all options listed below are Ruby driver client options (the mongo gem).
|
20
|
+
# Please refer to the driver documentation of the version of the mongo gem you are using
|
21
|
+
# for the most up-to-date list of options.
|
22
|
+
#
|
23
|
+
# Change the default write concern. (default = { w: 1 })
|
24
|
+
# write:
|
25
|
+
# w: 1
|
26
|
+
|
27
|
+
# Change the default read preference. Valid options for mode are: :secondary,
|
28
|
+
# :secondary_preferred, :primary, :primary_preferred, :nearest
|
29
|
+
# (default: primary)
|
30
|
+
# read:
|
31
|
+
# mode: :secondary_preferred
|
32
|
+
# tag_sets:
|
33
|
+
# - use: web
|
34
|
+
|
35
|
+
# The name of the user for authentication.
|
36
|
+
# user: 'user'
|
37
|
+
|
38
|
+
# The password of the user for authentication.
|
39
|
+
# password: 'password'
|
40
|
+
|
41
|
+
# The user's database roles.
|
42
|
+
# roles:
|
43
|
+
# - 'dbOwner'
|
44
|
+
|
45
|
+
# Change the default authentication mechanism. Valid options are: :scram,
|
46
|
+
# :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication
|
47
|
+
# mechanisms require username and password, with the exception of :mongodb_x509.
|
48
|
+
# Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain.
|
49
|
+
# auth_mech: :scram
|
50
|
+
|
51
|
+
# The database or source to authenticate the user against.
|
52
|
+
# (default: the database specified above or admin)
|
53
|
+
# auth_source: admin
|
54
|
+
|
55
|
+
# Force a the driver cluster to behave in a certain manner instead of auto-
|
56
|
+
# discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct
|
57
|
+
# when connecting to hidden members of a replica set.
|
58
|
+
# connect: :direct
|
59
|
+
|
60
|
+
# Changes the default time in seconds the server monitors refresh their status
|
61
|
+
# via ismaster commands. (default: 10)
|
62
|
+
# heartbeat_frequency: 10
|
63
|
+
|
64
|
+
# The time in seconds for selecting servers for a near read preference. (default: 0.015)
|
65
|
+
# local_threshold: 0.015
|
66
|
+
|
67
|
+
# The timeout in seconds for selecting a server for an operation. (default: 30)
|
68
|
+
# server_selection_timeout: 30
|
69
|
+
|
70
|
+
# The maximum number of connections in the connection pool. (default: 5)
|
71
|
+
# max_pool_size: 5
|
72
|
+
|
73
|
+
# The minimum number of connections in the connection pool. (default: 1)
|
74
|
+
# min_pool_size: 1
|
75
|
+
|
76
|
+
# The time to wait, in seconds, in the connection pool for a connection
|
77
|
+
# to be checked in before timing out. (default: 5)
|
78
|
+
# wait_queue_timeout: 5
|
79
|
+
|
80
|
+
# The time to wait to establish a connection before timing out, in seconds.
|
81
|
+
# (default: 10)
|
82
|
+
# connect_timeout: 10
|
83
|
+
|
84
|
+
# The timeout to wait to execute operations on a socket before raising an error.
|
85
|
+
# (default: 5)
|
86
|
+
# socket_timeout: 5
|
87
|
+
|
88
|
+
# The name of the replica set to connect to. Servers provided as seeds that do
|
89
|
+
# not belong to this replica set will be ignored.
|
90
|
+
# replica_set: name
|
91
|
+
|
92
|
+
# Whether to connect to the servers via ssl. (default: false)
|
93
|
+
# ssl: true
|
94
|
+
|
95
|
+
# The certificate file used to identify the connection against MongoDB.
|
96
|
+
# ssl_cert: /path/to/my.cert
|
97
|
+
|
98
|
+
# The private keyfile used to identify the connection against MongoDB.
|
99
|
+
# Note that even if the key is stored in the same file as the certificate,
|
100
|
+
# both need to be explicitly specified.
|
101
|
+
# ssl_key: /path/to/my.key
|
102
|
+
|
103
|
+
# A passphrase for the private key.
|
104
|
+
# ssl_key_pass_phrase: password
|
105
|
+
|
106
|
+
# Whether to do peer certification validation. (default: true)
|
107
|
+
# ssl_verify: true
|
108
|
+
|
109
|
+
# The file containing concatenated certificate authority certificates
|
110
|
+
# used to validate certs passed from the other end of the connection.
|
111
|
+
# ssl_ca_cert: /path/to/ca.cert
|
112
|
+
|
113
|
+
# Whether to truncate long log lines. (default: true)
|
114
|
+
# truncate_logs: true
|
115
|
+
|
116
|
+
# Configure Mongoid specific options. (optional)
|
117
|
+
options:
|
118
|
+
# Includes the root model name in json serialization. (default: false)
|
119
|
+
# include_root_in_json: false
|
120
|
+
|
121
|
+
# Include the _type field in serialization. (default: false)
|
122
|
+
# include_type_for_serialization: false
|
123
|
+
|
124
|
+
# Preload all models in development, needed when models use
|
125
|
+
# inheritance. (default: false)
|
126
|
+
# preload_models: false
|
127
|
+
|
128
|
+
# Raise an error when performing a #find and the document is not found.
|
129
|
+
# (default: true)
|
130
|
+
# raise_not_found_error: true
|
131
|
+
raise_not_found_error: false
|
132
|
+
|
133
|
+
# Raise an error when defining a scope with the same name as an
|
134
|
+
# existing method. (default: false)
|
135
|
+
# scope_overwrite_exception: false
|
136
|
+
|
137
|
+
# Raise an error when defining a field with the same name as an
|
138
|
+
# existing method. (default: false)
|
139
|
+
# duplicate_fields_exception: false
|
140
|
+
|
141
|
+
# Use Active Support's time zone in conversions. (default: true)
|
142
|
+
# use_activesupport_time_zone: true
|
143
|
+
|
144
|
+
# Ensure all times are UTC in the app side. (default: false)
|
145
|
+
# use_utc: false
|
146
|
+
|
147
|
+
# Set the Mongoid and Ruby driver log levels when not in a Rails
|
148
|
+
# environment. The Mongoid logger will be set to the Rails logger
|
149
|
+
# otherwise.(default: :info)
|
150
|
+
# log_level: :info
|
151
|
+
|
152
|
+
# Control whether `belongs_to` association is required. By default
|
153
|
+
# `belongs_to` will trigger a validation error if the association
|
154
|
+
# is not present. (default: true)
|
155
|
+
# belongs_to_required_by_default: true
|
156
|
+
belongs_to_required_by_default: false
|
157
|
+
|
158
|
+
# Application name that is printed to the mongodb logs upon establishing a
|
159
|
+
# connection in server versions >= 3.4. Note that the name cannot exceed 128 bytes.
|
160
|
+
# app_name: MyApplicationName
|
161
|
+
|
162
|
+
production:
|
163
|
+
clients:
|
164
|
+
default:
|
165
|
+
uri: <%= ENV['MONGODB_URI'] %>
|
166
|
+
options:
|
167
|
+
raise_not_found_error: false
|
168
|
+
belongs_to_required_by_default: false
|
169
|
+
|
170
|
+
|
171
|
+
# Use background indexes by default if `background` option not specified. (default: false)
|
172
|
+
# background_indexing: false
|
173
|
+
test:
|
174
|
+
clients:
|
175
|
+
default:
|
176
|
+
database: shop263603_test
|
177
|
+
hosts:
|
178
|
+
- localhost:27017
|
179
|
+
options:
|
180
|
+
read:
|
181
|
+
mode: :primary
|
182
|
+
max_pool_size: 1
|
@@ -0,0 +1,182 @@
|
|
1
|
+
development:
|
2
|
+
# Configure available database clients. (required)
|
3
|
+
clients:
|
4
|
+
# Defines the default client. (required)
|
5
|
+
default:
|
6
|
+
# Mongoid can connect to a URI accepted by the driver:
|
7
|
+
# uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development
|
8
|
+
|
9
|
+
# Otherwise define the parameters separately.
|
10
|
+
# This defines the name of the default database that Mongoid can connect to.
|
11
|
+
# (required).
|
12
|
+
database: shop263603_development
|
13
|
+
# Provides the hosts the default client can connect to. Must be an array
|
14
|
+
# of host:port pairs. (required)
|
15
|
+
hosts:
|
16
|
+
- localhost:27017
|
17
|
+
# - mongodb
|
18
|
+
options:
|
19
|
+
# Note that all options listed below are Ruby driver client options (the mongo gem).
|
20
|
+
# Please refer to the driver documentation of the version of the mongo gem you are using
|
21
|
+
# for the most up-to-date list of options.
|
22
|
+
#
|
23
|
+
# Change the default write concern. (default = { w: 1 })
|
24
|
+
# write:
|
25
|
+
# w: 1
|
26
|
+
|
27
|
+
# Change the default read preference. Valid options for mode are: :secondary,
|
28
|
+
# :secondary_preferred, :primary, :primary_preferred, :nearest
|
29
|
+
# (default: primary)
|
30
|
+
# read:
|
31
|
+
# mode: :secondary_preferred
|
32
|
+
# tag_sets:
|
33
|
+
# - use: web
|
34
|
+
|
35
|
+
# The name of the user for authentication.
|
36
|
+
# user: 'user'
|
37
|
+
|
38
|
+
# The password of the user for authentication.
|
39
|
+
# password: 'password'
|
40
|
+
|
41
|
+
# The user's database roles.
|
42
|
+
# roles:
|
43
|
+
# - 'dbOwner'
|
44
|
+
|
45
|
+
# Change the default authentication mechanism. Valid options are: :scram,
|
46
|
+
# :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication
|
47
|
+
# mechanisms require username and password, with the exception of :mongodb_x509.
|
48
|
+
# Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain.
|
49
|
+
# auth_mech: :scram
|
50
|
+
|
51
|
+
# The database or source to authenticate the user against.
|
52
|
+
# (default: the database specified above or admin)
|
53
|
+
# auth_source: admin
|
54
|
+
|
55
|
+
# Force a the driver cluster to behave in a certain manner instead of auto-
|
56
|
+
# discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct
|
57
|
+
# when connecting to hidden members of a replica set.
|
58
|
+
# connect: :direct
|
59
|
+
|
60
|
+
# Changes the default time in seconds the server monitors refresh their status
|
61
|
+
# via ismaster commands. (default: 10)
|
62
|
+
# heartbeat_frequency: 10
|
63
|
+
|
64
|
+
# The time in seconds for selecting servers for a near read preference. (default: 0.015)
|
65
|
+
# local_threshold: 0.015
|
66
|
+
|
67
|
+
# The timeout in seconds for selecting a server for an operation. (default: 30)
|
68
|
+
# server_selection_timeout: 30
|
69
|
+
|
70
|
+
# The maximum number of connections in the connection pool. (default: 5)
|
71
|
+
# max_pool_size: 5
|
72
|
+
|
73
|
+
# The minimum number of connections in the connection pool. (default: 1)
|
74
|
+
# min_pool_size: 1
|
75
|
+
|
76
|
+
# The time to wait, in seconds, in the connection pool for a connection
|
77
|
+
# to be checked in before timing out. (default: 5)
|
78
|
+
# wait_queue_timeout: 5
|
79
|
+
|
80
|
+
# The time to wait to establish a connection before timing out, in seconds.
|
81
|
+
# (default: 10)
|
82
|
+
# connect_timeout: 10
|
83
|
+
|
84
|
+
# The timeout to wait to execute operations on a socket before raising an error.
|
85
|
+
# (default: 5)
|
86
|
+
# socket_timeout: 5
|
87
|
+
|
88
|
+
# The name of the replica set to connect to. Servers provided as seeds that do
|
89
|
+
# not belong to this replica set will be ignored.
|
90
|
+
# replica_set: name
|
91
|
+
|
92
|
+
# Whether to connect to the servers via ssl. (default: false)
|
93
|
+
# ssl: true
|
94
|
+
|
95
|
+
# The certificate file used to identify the connection against MongoDB.
|
96
|
+
# ssl_cert: /path/to/my.cert
|
97
|
+
|
98
|
+
# The private keyfile used to identify the connection against MongoDB.
|
99
|
+
# Note that even if the key is stored in the same file as the certificate,
|
100
|
+
# both need to be explicitly specified.
|
101
|
+
# ssl_key: /path/to/my.key
|
102
|
+
|
103
|
+
# A passphrase for the private key.
|
104
|
+
# ssl_key_pass_phrase: password
|
105
|
+
|
106
|
+
# Whether to do peer certification validation. (default: true)
|
107
|
+
# ssl_verify: true
|
108
|
+
|
109
|
+
# The file containing concatenated certificate authority certificates
|
110
|
+
# used to validate certs passed from the other end of the connection.
|
111
|
+
# ssl_ca_cert: /path/to/ca.cert
|
112
|
+
|
113
|
+
# Whether to truncate long log lines. (default: true)
|
114
|
+
# truncate_logs: true
|
115
|
+
|
116
|
+
# Configure Mongoid specific options. (optional)
|
117
|
+
options:
|
118
|
+
# Includes the root model name in json serialization. (default: false)
|
119
|
+
# include_root_in_json: false
|
120
|
+
|
121
|
+
# Include the _type field in serialization. (default: false)
|
122
|
+
# include_type_for_serialization: false
|
123
|
+
|
124
|
+
# Preload all models in development, needed when models use
|
125
|
+
# inheritance. (default: false)
|
126
|
+
# preload_models: false
|
127
|
+
|
128
|
+
# Raise an error when performing a #find and the document is not found.
|
129
|
+
# (default: true)
|
130
|
+
# raise_not_found_error: true
|
131
|
+
raise_not_found_error: false
|
132
|
+
|
133
|
+
# Raise an error when defining a scope with the same name as an
|
134
|
+
# existing method. (default: false)
|
135
|
+
# scope_overwrite_exception: false
|
136
|
+
|
137
|
+
# Raise an error when defining a field with the same name as an
|
138
|
+
# existing method. (default: false)
|
139
|
+
# duplicate_fields_exception: false
|
140
|
+
|
141
|
+
# Use Active Support's time zone in conversions. (default: true)
|
142
|
+
# use_activesupport_time_zone: true
|
143
|
+
|
144
|
+
# Ensure all times are UTC in the app side. (default: false)
|
145
|
+
# use_utc: false
|
146
|
+
|
147
|
+
# Set the Mongoid and Ruby driver log levels when not in a Rails
|
148
|
+
# environment. The Mongoid logger will be set to the Rails logger
|
149
|
+
# otherwise.(default: :info)
|
150
|
+
# log_level: :info
|
151
|
+
|
152
|
+
# Control whether `belongs_to` association is required. By default
|
153
|
+
# `belongs_to` will trigger a validation error if the association
|
154
|
+
# is not present. (default: true)
|
155
|
+
# belongs_to_required_by_default: true
|
156
|
+
belongs_to_required_by_default: false
|
157
|
+
|
158
|
+
# Application name that is printed to the mongodb logs upon establishing a
|
159
|
+
# connection in server versions >= 3.4. Note that the name cannot exceed 128 bytes.
|
160
|
+
# app_name: MyApplicationName
|
161
|
+
|
162
|
+
production:
|
163
|
+
clients:
|
164
|
+
default:
|
165
|
+
uri: <%= ENV['MONGODB_URI'] %>
|
166
|
+
options:
|
167
|
+
raise_not_found_error: false
|
168
|
+
belongs_to_required_by_default: false
|
169
|
+
|
170
|
+
|
171
|
+
# Use background indexes by default if `background` option not specified. (default: false)
|
172
|
+
# background_indexing: false
|
173
|
+
test:
|
174
|
+
clients:
|
175
|
+
default:
|
176
|
+
database: shop263603_test
|
177
|
+
hosts:
|
178
|
+
- localhost:27017
|
179
|
+
options:
|
180
|
+
read:
|
181
|
+
mode: :primary
|
182
|
+
max_pool_size: 1
|
@@ -0,0 +1,16 @@
|
|
1
|
+
version: '3'
|
2
|
+
services:
|
3
|
+
web:
|
4
|
+
build: .
|
5
|
+
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
6
|
+
volumes:
|
7
|
+
- .:/myapp
|
8
|
+
ports:
|
9
|
+
- "3000:3000"
|
10
|
+
depends_on:
|
11
|
+
- mongodb
|
12
|
+
|
13
|
+
mongodb:
|
14
|
+
image: mongo
|
15
|
+
ports:
|
16
|
+
- "27017:27017"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
set -e
|
3
|
+
# change mongoid.yml for docker
|
4
|
+
cp /myapp/config/mongoid.yml-docker /myapp/config/mongoid.yml
|
5
|
+
# Remove a potentially pre-existing server.pid for Rails.
|
6
|
+
rm -f /myapp/tmp/pids/server.pid
|
7
|
+
# Compile the assets
|
8
|
+
# bundle exec rake assets:precompile
|
9
|
+
# Add admin user
|
10
|
+
rake jinda:seed
|
11
|
+
# Then exec the container's main process (what's set as CMD in the Dockerfile).
|
12
|
+
exec "$@"
|
data/lib/jinda/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jinda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Prateep Kul
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-11-
|
12
|
+
date: 2020-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- lib/generators/jinda/install_generator.rb
|
83
83
|
- lib/generators/jinda/minitest_generator.rb
|
84
84
|
- lib/generators/jinda/rspec_generator.rb
|
85
|
+
- lib/generators/jinda/templates/Dockerfile
|
85
86
|
- lib/generators/jinda/templates/README.md
|
86
87
|
- lib/generators/jinda/templates/app/assets/config/manifest.js
|
87
88
|
- lib/generators/jinda/templates/app/assets/images/4dcity-old.ico
|
@@ -337,9 +338,13 @@ files:
|
|
337
338
|
- lib/generators/jinda/templates/app/views/users/pwd/enter.html.erb
|
338
339
|
- lib/generators/jinda/templates/app/views/users/user/enter_user.html.erb
|
339
340
|
- lib/generators/jinda/templates/config/cloudinary.yml
|
341
|
+
- lib/generators/jinda/templates/config/mongoid.yml-docker
|
342
|
+
- lib/generators/jinda/templates/config/mongoid.yml-localhost
|
340
343
|
- lib/generators/jinda/templates/db/seeds.rb
|
344
|
+
- lib/generators/jinda/templates/docker-compose.yml
|
341
345
|
- lib/generators/jinda/templates/dot/dot.env
|
342
346
|
- lib/generators/jinda/templates/dotrspec
|
347
|
+
- lib/generators/jinda/templates/entrypoint.sh
|
343
348
|
- lib/generators/jinda/templates/jinda.yml
|
344
349
|
- lib/generators/jinda/templates/public/404.html
|
345
350
|
- lib/generators/jinda/templates/public/422.html
|