Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added configuration to the application
- Loading branch information
Showing
5 changed files
with
60 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,30 +1,57 @@ | |||
/** | /** | ||
* Main vertivle for the office events application. This verticle | * Main verticle for the office events application. This verticle | ||
* installs the modules and the worker verticle that make the | * installs the modules and the worker verticle that make the | ||
* application run. | * application do its job. | ||
* | * | ||
* @author Jettro Coenradie | * @author Jettro Coenradie | ||
*/ | */ | ||
|
|||
|
|||
|
|||
def log = container.logger | def log = container.logger | ||
|
|
||
def mongoConfig = ["db_name": "officeevents", "address": "vertx.persist"] | def destiationPersist = "vertx.persist" | ||
def topicAllClients = "message.all.clients" | |||
|
|||
def appConfig = [ | |||
persisterConfig: [ | |||
"db_name": "officeevents", | |||
"address": destiationPersist | |||
], | |||
websiteConfig: [ | |||
"port": 8080 | |||
], | |||
notificationsConfig: [ | |||
"all_clients_address": topicAllClients, | |||
"notification_received": "notification.received" | |||
], | |||
invitationConfig: [ | |||
"all_clients_address": topicAllClients, | |||
"invitation_new": "message.newinvitation", | |||
"invitation_register": "message.registerinvitation", | |||
"vertx_persist": destiationPersist | |||
], | |||
backupConfig: [ | |||
"backup_create":"message.backup.create", | |||
"vertx_persist": destiationPersist | |||
] | |||
] | |||
|
|
||
container.with { | container.with { | ||
deployModule('vertx.mongo-persistor-v1.2', mongoConfig, 1) { deploymentID -> | deployModule('vertx.mongo-persistor-v1.2', appConfig["persisterConfig"], 1) { | ||
log.info "Started the mongo-persister module." | log.info "App: Started the mongo-persister module." | ||
} | } | ||
deployModule('website', [:], 4) {deploymentID -> | deployModule('website', appConfig["websiteConfig"], 2) { | ||
log.info "Started the website module." | log.info "App: Started the website module." | ||
} | } | ||
deployModule('notifications') { deploymentID -> | deployModule('notifications', appConfig["notificationsConfig"],1) { | ||
log.info "Started the notifications module." | log.info "App: Started the notifications module." | ||
} | } | ||
deployModule('invitations') { deploymentID -> | deployModule('invitations', appConfig["invitationConfig"],1) { | ||
log.info "Started the invitations module." | log.info "App: Started the invitations module." | ||
} | } | ||
deployWorkerVerticle('app/backup/Backup.groovy') { deploymentID -> | deployWorkerVerticle('app/backup/Backup.groovy', appConfig["backupConfig"],1) { | ||
log.info "Started the backup worker verticle." | log.info "App: Started the backup worker verticle." | ||
} | } | ||
|
|||
} | } | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters