Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Read DB_PORT from env #1034

Merged
merged 1 commit into from
Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Styles for free text units. [#867](https://github.com/geli-lms/geli/issues/867)
- Export PDF with styled free text units. [#997](https://github.com/geli-lms/geli/issues/997)
- Course-view-navigation for edit-users. [#924](https://github.com/geli-lms/geli/issues/924)
- Make MongoDB port configurable `DB_PORT`. [#1034](https://github.com/geli-lms/geli/pull/1034)

### Changed
- Update mongoose to 5.2.x. [#1004](https://github.com/geli-lms/geli/pull/1004)
Expand Down
2 changes: 1 addition & 1 deletion api/src/config/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
baseurl: process.env.BASEURL || 'http://localhost:4200',

// Database connection information
database: `mongodb://${process.env.DB_HOST || 'localhost'}:27017/${process.env.DB_NAME || 'geli'}`,
database: `mongodb://${process.env.DB_HOST || 'localhost'}:${process.env.DB_PORT || '27017'}/${process.env.DB_NAME || 'geli'}`,

// Setting port for server
port: process.env.PORT || 3030,
Expand Down
5 changes: 3 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ The API can be configured using the following environment variables.
| Variable | Description | Example value |
| --- | --- | --- |
| `BASEURL` | The URL you are hosting the web frontend at. This is used inside of e-mails. | `https://geli.fbi.h-da.de` |
| `DB_HOST` | The host your MongoDB instance is running on (port `27017`) | `localhost` |
| `DB_HOST` | The host your MongoDB instance is running on | `localhost` |
| `DB_PORT` | The port your MongoDB instance is listening on | `27017` |
| `MAILPROVIDER` | Use this when you are not using SMTP. Available providers are listed [here](https://nodemailer.com/smtp/well-known/) | `DebugMail` |
| `MAILSMTPSERVER` | The host your SMTP server is running on | `localhost` |
| `MAILSMTPPORT` | The port your SMTP server ist listening on | `25` |
| `MAILSMTPPORT` | The port your SMTP server is listening on | `25` |
| `MAILUSER` | The username for your e-mail service | - |
| `MAILPASS` | The password for your e-mail service | - |
| `MAILSENDER` | The sender e-mail address the API should use | `[email protected]` |
Expand Down