fixed bug pointing to wrong mongodb after refactor and adding template config files
This commit is contained in:
parent
ac0e16f5ed
commit
8998fac792
4
.env_template
Normal file
4
.env_template
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
USER=username
|
||||
PASSWORD=really_strong_password
|
||||
EMAIL=email
|
||||
DOMAIN=your_domain.tld
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -6,4 +6,4 @@ nginx/certs/
|
|||
nginx/conf.d/default.conf
|
||||
nextcloud/
|
||||
gitea/
|
||||
.env*
|
||||
.env
|
||||
|
|
|
|||
|
|
@ -193,6 +193,8 @@ services:
|
|||
- GITEA__database__USER=${USER}
|
||||
- GITEA__database__PASSWD=${PASSWORD}
|
||||
- GITEA__server__LANDING_PAGE=/${USER}
|
||||
- GITEA__attachment__MAX_SIZE=5000
|
||||
#- GITEA__repository.upload__FILE_MAX_SIZE=5000
|
||||
# NOTE: This next line can be commented out if you want to run the wizard locally
|
||||
# But it needs to be set properly as the base url to work remotely
|
||||
# no matter how you run the wizard
|
||||
|
|
@ -249,19 +251,19 @@ services:
|
|||
- MYSQL_HOST=mysql-nextcloud
|
||||
- NEXTCLOUD_ADMIN_USER=${USER}
|
||||
- NEXTCLOUD_ADMIN_PASSWORD=${PASSWORD}
|
||||
- NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN} *.${DOMAIN} cloud.${DOMAIN} nextcloud.${DOMAIN}
|
||||
- TRUSTED_PROXIES=nginx-proxy
|
||||
- VIRTUAL_HOST=${DOMAIN},*.${DOMAIN},cloud.${DOMAIN},nextcloud.${DOMAIN}
|
||||
- VIRTUAL_PORT=8888
|
||||
- NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN} *.${DOMAIN} cloud.${DOMAIN} nextcloud.${DOMAIN} #localdev.${DOMAIN}
|
||||
#- APACHE_DISABLE_REWRITE_IP=1
|
||||
#- OVERWRITEHOST=${DOMAIN}
|
||||
#- TRUSTED_PROXIES=nginx-proxy
|
||||
#- OVERWRITEHOST=${DOMAIN}:8888
|
||||
#- OVERWRITEWEBROOT=/cloud
|
||||
#- OVERWRITEPROTOCOL=https
|
||||
#- OVERWRITECLIURL=http://localhost/
|
||||
- VIRTUAL_HOST=${DOMAIN},*.${DOMAIN},cloud.${DOMAIN},nextcloud.${DOMAIN} #,localdev.${DOMAIN}
|
||||
- VIRTUAL_PORT=8888
|
||||
# TODO: It would be great to move thie to a subdirectory ${DOMAIN}/cloud
|
||||
# as opposed to a subdomain cloud.${DOMAIN}
|
||||
# but it is really, really difficult with nextcloud
|
||||
- VIRTUAL_PATH=/cloud/
|
||||
- VIRTUAL_PATH=/cloud
|
||||
- VIRTUAL_DEST=/
|
||||
# TODO: add redis and chron
|
||||
#- REDIS_HOST=redis
|
||||
|
|
@ -271,8 +273,9 @@ services:
|
|||
#redis:
|
||||
ports:
|
||||
- 8888:80
|
||||
expose:
|
||||
- 8888
|
||||
- 8443:443
|
||||
#expose:
|
||||
# - 8888
|
||||
|
||||
mysql-nextcloud:
|
||||
image: mariadb:10
|
||||
|
|
|
|||
4
portfolio/src/.env_template
Normal file
4
portfolio/src/.env_template
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
USER=username
|
||||
PASSWORD=really_strong_password
|
||||
EMAIL=email
|
||||
DOMAIN=your_domain.tld
|
||||
|
|
@ -16,8 +16,8 @@ require('dotenv').config();
|
|||
const port = process.env.PORT || 3000;
|
||||
|
||||
var MongoClient = require('mongodb').MongoClient;
|
||||
var url = 'mongodb://' + process.env.USER + ':' + process.env.PASSWORD + '@mongo:27017/unboundedpress?authSource=admin';
|
||||
var dbName = "unboundedpress";
|
||||
var url = 'mongodb://' + process.env.USER + ':' + process.env.PASSWORD + '@mongo:27017/portfolio?authSource=admin';
|
||||
var dbName = "portfolio";
|
||||
var assert = require('assert');
|
||||
|
||||
|
||||
|
|
@ -39,7 +39,6 @@ var client = MongoClient.connect(url, function (err, client) {
|
|||
});
|
||||
|
||||
// close client when app closes
|
||||
|
||||
const cleanup = (event) => { // SIGINT is sent for example when you Ctrl+C a running process from the command line.
|
||||
client.close(); // Close MongodDB Connection when Process ends
|
||||
process.exit(); // Exit with default success-code '0'.
|
||||
|
|
|
|||
Loading…
Reference in a new issue