add more options to as ENV settings

Einar Stenberg committed Dec 12, 2021 at 22:06 UTC 259c3ef66ce1cd77079488ce0c842bcdab817c49
3 files changed +14 -6
docker/config.json.template
+4 -2
@@ -1,6 +1,7 @@
1 {
2 "$schema": "http://info.meshcentral.com/downloads/meshcentral-config-schema.json",
3 "settings": {
4 + "plugins":{"enabled": false},
5 "cert": "myserver.mydomain.com",
6 "_WANonly": true,
7 "_LANonly": true,
@@ -19,8 +20,9 @@
20 "": {
21 "_title": "MyServer",
22 "_title2": "Servername",
22 - "_minify": true,
23 + "minify": true,
24 "NewAccounts": true,
25 + "localSessionRecording": false,
26 "_userNameIsEmail": true,
27 "_certUrl": "my.reverse.proxy"
28 }
@@ -31,4 +33,4 @@
33 "_names": "myserver.mydomain.com",
34 "production": false
35 }
34 -}
36 +}
\ No newline at end of file
docker/readme.md
+6 -3
@@ -9,14 +9,14 @@ docker build -t meshcentral .
9
10 docker-compose.yml example:
11 ```yaml
12 -version: '2'
12 +version: '3'
13 services:
14 meshcentral:
15 restart: always
16 container_name: meshcentral
17 - image: meshcentral
17 + image: einar/meshcentral
18 ports:
19 - - 443:443 #MeshCentral will moan and try everything not to use port 80, but you can also use it if you so desire, just change the config.json according to your needs
19 + - 8086:443 #MeshCentral will moan and try everything not to use port 80, but you can also use it if you so desire, just change the config.json according to your needs
20 environment:
21 - HOSTNAME=my.domain.com #your hostname
22 - REVERSE_PROXY=false #set to your reverse proxy IP if you want to put meshcentral behind a reverse proxy
@@ -24,6 +24,9 @@ services:
24 - IFRAME=false #set to true if you wish to enable iframe support
25 - ALLOW_NEW_ACCOUNTS=true #set to false if you want disable self-service creation of new accounts besides the first (admin)
26 - WEBRTC=false #set to true to enable WebRTC - per documentation it is not officially released with meshcentral, but is solid enough to work with. Use with caution
27 + - ALLOWPLUGINS=false #set to true to allow plugins
28 + - LOCALSESSIONRECORDING=false # set to true to allow session recording
29 + - MINIFY=true #set to enable or disable minification of json, reduces traffic
30 volumes:
31 - ./meshcentral/data:/opt/meshcentral/meshcentral-data #config.json and other important files live here. A must for data persistence
32 - ./meshcentral/user_files:/opt/meshcentral/meshcentral-files #where file uploads for users live
docker/startup.sh
+4 -1
@@ -16,6 +16,9 @@ if [ -f "meshcentral-data/config.json" ]
16 cp config.json.template meshcentral-data/config.json
17 sed -i "s/\"cert\": \"myserver.mydomain.com\"/\"cert\": \"$HOSTNAME\"/" meshcentral-data/config.json
18 sed -i "s/\"NewAccounts\": true/\"NewAccounts\": \"$ALLOW_NEW_ACCOUNTS\"/" meshcentral-data/config.json
19 + sed -i "s/\"enabled\": false/\"enabled\": \"$ALLOWPLUGINS\"/" meshcentral-data/config.json
20 + sed -i "s/\"localSessionRecording\": false/\"localSessionRecording\": \"$LOCALSESSIONRECORDING\"/" meshcentral-data/config.json
21 + sed -i "s/\"minify\": true/\"minify\": \"$MINIFY\"/" meshcentral-data/config.json
22 sed -i "s/\"WebRTC\": false/\"WebRTC\": \"$WEBRTC\"/" meshcentral-data/config.json
23 sed -i "s/\"AllowFraming\": false/\"AllowFraming\": \"$IFRAME\"/" meshcentral-data/config.json
24 if [ "$REVERSE_PROXY" != "false" ]
@@ -25,4 +28,4 @@ if [ -f "meshcentral-data/config.json" ]
28 exit
29 fi
30 node node_modules/meshcentral --cert "$HOSTNAME"
28 -fi
31 +fi
\ No newline at end of file