Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rails-api-with-engine-template
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
rails-api-with-engine-template
Commits
eb141795
Commit
eb141795
authored
Apr 24, 2022
by
liyijie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新mongoid的相关配置
parent
85e3f0cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
.env
src/.env
+6
-0
mongoid.yml
src/config/mongoid.yml
+33
-0
template.rb
template.rb
+2
-0
No files found.
src/.env
View file @
eb141795
...
...
@@ -14,3 +14,9 @@ S3_REGION = cn-east-2
S3_BUCKET = soa-storage
S3_ENDPOINT = https://obs.cn-east-2.myhuaweicloud.com
S3_PUBLIC = true
MONGO_DB_NAME = rails_mongo_record
MONGO_DB_HOSTS = 'localhost:27017'
MONGO_DB_POOL = 1
MONGO_DB_USERNAME =
MONGO_DB_PASSWORD =
src/config/mongoid.yml
0 → 100644
View file @
eb141795
development
:
clients
:
default
:
database
:
<%= ENV["MONGO_DB_NAME"] %>
hosts
:
<%= ENV["MONGO_DB_HOSTS"].split(',') %>
options
:
user
:
<%= ENV["MONGO_DB_USERNAME"] %>
password
:
<%= ENV["MONGO_DB_PASSWORD"] %>
options
:
test
:
clients
:
default
:
database
:
<%= ENV["MONGO_DB_NAME"] %>
hosts
:
<%= ENV["MONGO_DB_HOSTS"].split(',') %>
options
:
user
:
<%= ENV["MONGO_DB_USERNAME"] %>
password
:
<%= ENV["MONGO_DB_PASSWORD"] %>
read
:
mode
:
:primary
max_pool_size
:
<%= ENV["MONGO_DB_POOL"] %>
production
:
clients
:
default
:
database
:
<%= ENV["MONGO_DB_NAME"] %>
hosts
:
<%= ENV["MONGO_DB_HOSTS"].split(',') %>
options
:
user
:
<%= ENV["MONGO_DB_USERNAME"] %>
password
:
<%= ENV["MONGO_DB_PASSWORD"] %>
read
:
mode
:
:primary
max_pool_size
:
<%= ENV["MONGO_DB_POOL"] %>
template.rb
View file @
eb141795
...
...
@@ -121,6 +121,8 @@ after_bundle do
copy_file
'src/config/puma.rb'
,
'config/puma.rb'
remove_file
'config/database.yml'
copy_file
'src/config/database.yml'
,
'config/database.yml'
remove_file
'config/mongoid.yml'
copy_file
'src/config/mongoid.yml'
,
'config/mongoid.yml'
remove_file
'config/storage.yml'
copy_file
'src/config/storage.yml'
,
'config/storage.yml'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment