Skip to content

Commit

Permalink
Fix Mongo Env Pass Through
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewiski committed Feb 12, 2024
1 parent 04e5699 commit 6fc0cdc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ services:
- ..:/workspace:cached
container_name: uisptools_dev
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: "uisptools"
ME_CONFIG_MONGODB_ADMINPASSWORD: "U!spT00ls!"
ME_CONFIG_MONGODB_URL: "mongodb://uisptools:U!spT00ls!@uisptools_mongodb_dev:27017/"
MONGODBSERVERURL: "mongodb://uisptools:U!spT00ls!@uisptools_mongodb_dev:27017/"
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

Expand Down
14 changes: 9 additions & 5 deletions dockerCompose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ services:
- "49443:49443"
- "49080:49080"
volumes:
- /usr/src/uisptools/config:/usr/src/uisptools/config
- /var/log:/usr/src/uisptools/logs
- ../data/config:/usr/src/uisptools/config
- ../data/log:/usr/src/uisptools/logs
container_name: uisptools${UISPTOOLS_ALIAS}
environment:
MONGODB_URL: "mongodb://uisptools:U!spT00ls!@mongo_mongodb${UISPTOOLS_ALIAS}:27017/"
MONGODBSERVERURL: "${MONGODBSERVERURL:-mongodb://uisptools:U!spT00ls!@mongo_mongodb${UISPTOOLS_ALIAS}:27017/}"
GOOGLEAPIKEY: "${GOOGLEAPIKEY:-}"
depends_on:
- uisptools_mongodb
networks:
Expand All @@ -33,8 +34,11 @@ services:
MONGO_INITDB_ROOT_PASSWORD: "U!spT00ls!"
MONGO_INITDB_DATABASE: "uisptools"
volumes:
- /usr/src/uisptools/data/mongodb:/data/db
- ../mongodb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:ro
- ../data/mongodb/data/db:/data/db
- ../data/mongodb/data/configdb:/data/configdb
#- ../data/mongodb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:ro
- ../data/mongodb/docker-entrypoint-initdb.d/01_createDatabase.js:/docker-entrypoint-initdb.d/01_createDatabase.js:ro
- ../data/mongodb/docker-entrypoint-initdb.d/02_initWebServerPages.js:/docker-entrypoint-initdb.d/02_initWebServerPages.js:ro
# this for Production as only need to Expose to internal services inside of Docker
expose:
- "27017"
Expand Down
2 changes: 1 addition & 1 deletion dockerCompose/installUispToolsStandAlone.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# installUispToolsStandAlone.sh

VERSION=0.0.2.2024-02-12:0004
VERSION=0.0.2.2024-02-12:0005
echo installUispToolsStandAlone version $VERSION

UISPTOOLS_USER=""
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uisp-tools",
"version": "0.0.20",
"version": "0.0.21",
"description": "Tools for UISP",
"main": "server.js",
"license": "GPL-3.0-or-later",
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if (process.env.localDebug === 'true') {
var defaultConfig = {
"configDirectory": configFileOptions.configDirectory,
"urlPrefix": "uisptools/",
"mongoDbServerUrl": process.env.MONGODB_URL || "mongodb://uisptools:U!spT00ls!@uisptools_mongodb:27017/?connectTimeoutMS=300000&authSource=admin",
"mongoDbServerUrl": process.env.MONGODBSERVERURL || "mongodb://uisptools:U!spT00ls!@uisptools_mongodb:27017/?connectTimeoutMS=300000&authSource=admin",
"mongoDbDatabaseName": "uisptools",
"logDirectory": "logs",
"adminRoute": "/admin",
Expand Down

0 comments on commit 6fc0cdc

Please sign in to comment.