Skip to content

Commit

Permalink
fix(docker): universal config
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Feb 18, 2019
1 parent 35acf04 commit a338f3a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var mongoConnectionUri = {
port: process.env.TD_MONGODB_PORT || nconf.get('mongo:port') || '27017',
username: process.env.TD_MONGODB_USERNAME || nconf.get('mongo:username'),
password: process.env.TD_MONGODB_PASSWORD || nconf.get('mongo:password'),
database: process.env.TD_MONGODB_DATABASE ? 'trudesk_' + process.env.MONGODB_DATABASE : nconf.get('mongo:database')
database: process.env.TD_MONGODB_DATABASE || nconf.get('mongo:database')
}

var CONNECTION_URI = ''
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/hbs/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,8 @@ var helpers = {
return options.inverse(this)
},

isNot: function (obj, options) {
if (!(_.isUndefined(obj) || _.isNull(obj) || obj === true)) return options.fn(this)
isNotTrue: function (obj, options) {
if (!(_.isUndefined(obj) || _.isNull(obj) || obj === true || obj === 'true')) return options.fn(this)

return options.inverse(this)
},
Expand Down
23 changes: 12 additions & 11 deletions src/views/install.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
<button class="btn md-btn md-btn-wave md-btn-success" data-next>Lets Start</button>
</div>

{{#isNot isDocker}}
{{#isNotTrue isDocker}}
<div class="slide hide">
<h2 style="margin-bottom: 25px;">MongoDB Connection</h2>
<p style="text-align: left;">
Expand Down Expand Up @@ -308,16 +308,17 @@
</form>
<a href="https://www.mongodb.com/" class="no-ajaxy" target="_blank">What is MongoDB?</a>
</div>
{{/isNot}}

<div class="slide hide">
<h2 style="margin-bottom: 25px;">Existing Database?</h2>
<p style="text-align: left; margin-bottom: 20px;">
Is this mongodb connection an existing database or a new database?
</p>
<button class="btn md-btn md-btn-wave md-btn-success" type="button" style="margin: 0 0 10px 0 !important;" data-next>New Database</button>
<button class="btn md-btn md-btn-wave md-btn-primary" type="button" id="existing-database-btn" style="margin: 0;">Existing Database</button>
</div>
{{/isNotTrue}}
{{#isNotTrue isDocker}}
<div class="slide hide">
<h2 style="margin-bottom: 25px;">Existing Database?</h2>
<p style="text-align: left; margin-bottom: 20px;">
Is this mongodb connection an existing database or a new database?
</p>
<button class="btn md-btn md-btn-wave md-btn-success" type="button" style="margin: 0 0 10px 0 !important;" data-next>New Database</button>
<button class="btn md-btn md-btn-wave md-btn-primary" type="button" id="existing-database-btn" style="margin: 0;">Existing Database</button>
</div>
{{/isNotTrue}}
<div class="slide hide">
<h2 style="margin-bottom: 25px;">Setup Account</h2>
<p style="text-align: left;">
Expand Down

0 comments on commit a338f3a

Please sign in to comment.