@flowfuse/driver-docker 1.15.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ #### 2.1.0: Release
2
+
3
+ - Add log passthrough support (#82) @hardillb
4
+
5
+ #### 2.0.0: Release
6
+
7
+
1
8
  #### 1.15.0: Release
2
9
 
3
10
  - #3174: Enable Multi-Core CPU Support for Node-RED Projects (#79) @elenaviter
package/README.md CHANGED
@@ -14,11 +14,13 @@ driver:
14
14
  socket: /var/run/docker.sock
15
15
  registry: containers.flowforge.com
16
16
  privateCA: /full/path/to/chain.pem
17
+ logPassthrough: true
17
18
  ```
18
19
 
19
20
  - `registry` is the Docker Registry to load Stack Containers from (default: Docker Hub)
20
21
  - `socket` is the path to the docker unix domain socket (default: /var/run/docker.sock)
21
- - privateCA: is the fully qualified path to a pem file containing trusted CA cert chain (default: not set)
22
+ - `privateCA`: is the fully qualified path to a pem file containing trusted CA cert chain (default: not set)
23
+ - `logPassthrough` Have Node-RED logs printed in JSON format to container stdout (default: false)
22
24
 
23
25
  ### Configuration via environment variables
24
26
 
package/docker.js CHANGED
@@ -86,7 +86,11 @@ const createContainer = async (project, domain) => {
86
86
  contOptions.Env.push(`FORGE_NR_SECRET=${credentialSecret}`)
87
87
  }
88
88
 
89
- if (this._app.config.driver.options.privateCA && fs.existsSync(this._app.config.driver.options.privateCA)) {
89
+ if (this._options?.logPassthrough) {
90
+ contOptions.Env.push('FORGE_LOG_PASSTHROUGH=true')
91
+ }
92
+
93
+ if (this._app.config.driver.options?.privateCA && fs.existsSync(this._app.config.driver.options?.privateCA)) {
90
94
  contOptions.Binds = [
91
95
  `${this._app.config.driver.options.privateCA}:/usr/local/ssl-certs/chain.pem`
92
96
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowfuse/driver-docker",
3
- "version": "1.15.0",
3
+ "version": "2.1.0",
4
4
  "description": "Docker driver for FlowFuse",
5
5
  "main": "docker.js",
6
6
  "scripts": {