Skip to content

Commit

Permalink
Seperated mongo db database name from URI string to support replica sets
Browse files Browse the repository at this point in the history
with authentication
  • Loading branch information
Christoph Papke committed Oct 22, 2018
1 parent 0bed136 commit 5f34f55
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions installer/roles/cloud-portal/templates/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ tomcat:
- 'MAIL_HOST={{ mail_host }}'
- 'MAIL_SEND={{ mail_send }}'
- 'MONGO_DB_URI={{ mongo_db_uri }}'
- 'MONGO_DB_DATABASE={{ mongo_db_database }}'

apache:
image: 'chrisipa/apache:latest'
Expand Down
3 changes: 2 additions & 1 deletion installer/vars.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"tomcat_ajp_port" : "8009",
"apache_http_port" : "80",
"apache_https_port" : "443",
"mongo_db_uri" : "mongodb://mongodb:27017/cloud-portal",
"mongo_db_uri" : "mongodb://mongodb:27017",
"mongo_db_database" : "cloud-portal",
"application_folder" : "/opt/cloud-portal",
"application_title" : "Cloud Portal",
"application_url" : "http://localhost:8080",
Expand Down
3 changes: 2 additions & 1 deletion modules/cloud-portal-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Self service web portal for different Cloud platforms like Azure, AWS and VMware
- 'MAIL_CC=my-cc-account@my-domain.com'
- 'MAIL_HOST=my-mail-server'
- 'MAIL_SEND=true'
- 'MONGO_DB_URI=mongodb://mongodb:27017/cloud-portal'
- 'MONGO_DB_URI=mongodb://mongodb:27017'
- 'MONGO_DB_DATABASE=cloud-portal'
```

* Run docker containers with docker compose:
Expand Down
2 changes: 1 addition & 1 deletion modules/cloud-portal-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
<port>${tomcat.https.port}:${tomcat.https.port}</port>
</ports>
<env>
<MONGO_DB_URI>mongodb://mongodb:27017/cloud-portal</MONGO_DB_URI>
<MONGO_DB_URI>mongodb://mongodb:27017</MONGO_DB_URI>
</env>
</run>
</image>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ APPLICATION_DATE_FORMAT=dd.MM.yyyy HH:mm:ss
# MONGO DB #
############

MONGO_DB_URI=mongodb://localhost:27017/cloud-portal
MONGO_DB_URI=mongodb://localhost:27017
MONGO_DB_DATABASE=cloud-portal


########
Expand Down Expand Up @@ -77,4 +78,5 @@ ENCRYPTOR_SECRET=pbGaynvta#ZvpF^@XzE%

spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
spring.data.mongodb.uri=${MONGO_DB_URI}
spring.data.mongodb.uri=${MONGO_DB_URI}
spring.data.mongodb.database=${MONGO_DB_DATABASE}

0 comments on commit 5f34f55

Please sign in to comment.