fixed bug pointing to wrong mongodb after refactor and adding template config files

legacy_v2
mwinter 2 years ago
parent ac0e16f5ed
commit 8998fac792

@ -0,0 +1,4 @@
USER=username
PASSWORD=really_strong_password
EMAIL=email
DOMAIN=your_domain.tld

2
.gitignore vendored

@ -6,4 +6,4 @@ nginx/certs/
nginx/conf.d/default.conf nginx/conf.d/default.conf
nextcloud/ nextcloud/
gitea/ gitea/
.env* .env

@ -193,6 +193,8 @@ services:
- GITEA__database__USER=${USER} - GITEA__database__USER=${USER}
- GITEA__database__PASSWD=${PASSWORD} - GITEA__database__PASSWD=${PASSWORD}
- GITEA__server__LANDING_PAGE=/${USER} - 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 # 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 # But it needs to be set properly as the base url to work remotely
# no matter how you run the wizard # no matter how you run the wizard
@ -249,19 +251,19 @@ services:
- MYSQL_HOST=mysql-nextcloud - MYSQL_HOST=mysql-nextcloud
- NEXTCLOUD_ADMIN_USER=${USER} - NEXTCLOUD_ADMIN_USER=${USER}
- NEXTCLOUD_ADMIN_PASSWORD=${PASSWORD} - NEXTCLOUD_ADMIN_PASSWORD=${PASSWORD}
- NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN} *.${DOMAIN} cloud.${DOMAIN} nextcloud.${DOMAIN} - NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN} *.${DOMAIN} cloud.${DOMAIN} nextcloud.${DOMAIN} #localdev.${DOMAIN}
- TRUSTED_PROXIES=nginx-proxy
- VIRTUAL_HOST=${DOMAIN},*.${DOMAIN},cloud.${DOMAIN},nextcloud.${DOMAIN}
- VIRTUAL_PORT=8888
#- APACHE_DISABLE_REWRITE_IP=1 #- APACHE_DISABLE_REWRITE_IP=1
#- OVERWRITEHOST=${DOMAIN} #- TRUSTED_PROXIES=nginx-proxy
#- OVERWRITEHOST=${DOMAIN}:8888
#- OVERWRITEWEBROOT=/cloud #- OVERWRITEWEBROOT=/cloud
#- OVERWRITEPROTOCOL=https #- OVERWRITEPROTOCOL=https
#- OVERWRITECLIURL=http://localhost/ #- 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 # TODO: It would be great to move thie to a subdirectory ${DOMAIN}/cloud
# as opposed to a subdomain cloud.${DOMAIN} # as opposed to a subdomain cloud.${DOMAIN}
# but it is really, really difficult with nextcloud # but it is really, really difficult with nextcloud
- VIRTUAL_PATH=/cloud/ - VIRTUAL_PATH=/cloud
- VIRTUAL_DEST=/ - VIRTUAL_DEST=/
# TODO: add redis and chron # TODO: add redis and chron
#- REDIS_HOST=redis #- REDIS_HOST=redis
@ -271,8 +273,9 @@ services:
#redis: #redis:
ports: ports:
- 8888:80 - 8888:80
expose: - 8443:443
- 8888 #expose:
# - 8888
mysql-nextcloud: mysql-nextcloud:
image: mariadb:10 image: mariadb:10

@ -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; const port = process.env.PORT || 3000;
var MongoClient = require('mongodb').MongoClient; var MongoClient = require('mongodb').MongoClient;
var url = 'mongodb://' + process.env.USER + ':' + process.env.PASSWORD + '@mongo:27017/unboundedpress?authSource=admin'; var url = 'mongodb://' + process.env.USER + ':' + process.env.PASSWORD + '@mongo:27017/portfolio?authSource=admin';
var dbName = "unboundedpress"; var dbName = "portfolio";
var assert = require('assert'); var assert = require('assert');
@ -39,7 +39,6 @@ var client = MongoClient.connect(url, function (err, client) {
}); });
// close client when app closes // close client when app closes
const cleanup = (event) => { // SIGINT is sent for example when you Ctrl+C a running process from the command line. 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 client.close(); // Close MongodDB Connection when Process ends
process.exit(); // Exit with default success-code '0'. process.exit(); // Exit with default success-code '0'.

Loading…
Cancel
Save