nodejs-poolcontroller 7.3.1 → 7.6.1
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/.eslintrc.json +44 -44
- package/.github/ISSUE_TEMPLATE/bug_report.md +52 -52
- package/CONTRIBUTING.md +74 -74
- package/Changelog +215 -195
- package/Dockerfile +17 -17
- package/Gruntfile.js +40 -40
- package/LICENSE +661 -661
- package/README.md +191 -186
- package/app.ts +2 -0
- package/config/Config.ts +27 -2
- package/config/VersionCheck.ts +33 -14
- package/config copy.json +299 -299
- package/controller/Constants.ts +88 -0
- package/controller/Equipment.ts +2459 -2225
- package/controller/Errors.ts +180 -157
- package/controller/Lockouts.ts +437 -0
- package/controller/State.ts +364 -79
- package/controller/boards/BoardFactory.ts +45 -45
- package/controller/boards/EasyTouchBoard.ts +2653 -2489
- package/controller/boards/IntelliCenterBoard.ts +4230 -3973
- package/controller/boards/IntelliComBoard.ts +63 -63
- package/controller/boards/IntelliTouchBoard.ts +241 -167
- package/controller/boards/NixieBoard.ts +1675 -1105
- package/controller/boards/SystemBoard.ts +4697 -3201
- package/controller/comms/Comms.ts +222 -10
- package/controller/comms/messages/Messages.ts +13 -9
- package/controller/comms/messages/config/ChlorinatorMessage.ts +13 -4
- package/controller/comms/messages/config/CircuitGroupMessage.ts +6 -0
- package/controller/comms/messages/config/CircuitMessage.ts +0 -0
- package/controller/comms/messages/config/ConfigMessage.ts +0 -0
- package/controller/comms/messages/config/CoverMessage.ts +1 -0
- package/controller/comms/messages/config/CustomNameMessage.ts +30 -30
- package/controller/comms/messages/config/EquipmentMessage.ts +4 -0
- package/controller/comms/messages/config/ExternalMessage.ts +53 -33
- package/controller/comms/messages/config/FeatureMessage.ts +8 -1
- package/controller/comms/messages/config/GeneralMessage.ts +8 -0
- package/controller/comms/messages/config/HeaterMessage.ts +14 -28
- package/controller/comms/messages/config/IntellichemMessage.ts +4 -1
- package/controller/comms/messages/config/OptionsMessage.ts +38 -2
- package/controller/comms/messages/config/PumpMessage.ts +4 -20
- package/controller/comms/messages/config/RemoteMessage.ts +4 -0
- package/controller/comms/messages/config/ScheduleMessage.ts +347 -331
- package/controller/comms/messages/config/SecurityMessage.ts +1 -0
- package/controller/comms/messages/config/ValveMessage.ts +13 -3
- package/controller/comms/messages/status/ChlorinatorStateMessage.ts +2 -3
- package/controller/comms/messages/status/EquipmentStateMessage.ts +79 -25
- package/controller/comms/messages/status/HeaterStateMessage.ts +86 -53
- package/controller/comms/messages/status/IntelliChemStateMessage.ts +445 -386
- package/controller/comms/messages/status/IntelliValveStateMessage.ts +35 -35
- package/controller/comms/messages/status/PumpStateMessage.ts +0 -0
- package/controller/comms/messages/status/VersionMessage.ts +0 -0
- package/controller/nixie/Nixie.ts +162 -160
- package/controller/nixie/NixieEquipment.ts +103 -103
- package/controller/nixie/bodies/Body.ts +120 -117
- package/controller/nixie/bodies/Filter.ts +135 -135
- package/controller/nixie/chemistry/ChemController.ts +2498 -2395
- package/controller/nixie/chemistry/Chlorinator.ts +314 -313
- package/controller/nixie/circuits/Circuit.ts +248 -210
- package/controller/nixie/heaters/Heater.ts +649 -441
- package/controller/nixie/pumps/Pump.ts +661 -599
- package/controller/nixie/schedules/Schedule.ts +257 -256
- package/controller/nixie/valves/Valve.ts +170 -170
- package/defaultConfig.json +286 -271
- package/issue_template.md +51 -51
- package/logger/DataLogger.ts +448 -433
- package/logger/Logger.ts +0 -0
- package/package.json +56 -54
- package/tsconfig.json +25 -25
- package/web/Server.ts +522 -31
- package/web/bindings/influxDB.json +1022 -894
- package/web/bindings/mqtt.json +654 -543
- package/web/bindings/mqttAlt.json +684 -574
- package/web/bindings/rulesManager.json +54 -54
- package/web/bindings/smartThings-Hubitat.json +31 -31
- package/web/bindings/valveRelays.json +20 -20
- package/web/bindings/vera.json +25 -25
- package/web/interfaces/baseInterface.ts +136 -136
- package/web/interfaces/httpInterface.ts +124 -122
- package/web/interfaces/influxInterface.ts +245 -240
- package/web/interfaces/mqttInterface.ts +475 -464
- package/web/services/config/Config.ts +181 -152
- package/web/services/config/ConfigSocket.ts +0 -0
- package/web/services/state/State.ts +118 -7
- package/web/services/state/StateSocket.ts +18 -1
- package/web/services/utilities/Utilities.ts +42 -42
package/Changelog
CHANGED
|
@@ -1,196 +1,216 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## 7.
|
|
11
|
-
1.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
1.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
1.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
1
|
|
59
|
-
1.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
## 6.0
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
1.
|
|
71
|
-
1.
|
|
72
|
-
1.
|
|
73
|
-
1.
|
|
74
|
-
1.
|
|
75
|
-
1.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
1.
|
|
92
|
-
1.
|
|
93
|
-
1.
|
|
94
|
-
1.
|
|
95
|
-
1.
|
|
96
|
-
1.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
## 5.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
1.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
1.
|
|
125
|
-
1.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* Support for
|
|
174
|
-
*
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
*
|
|
191
|
-
* Added
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
## 7.6
|
|
3
|
+
1. MasterTemp RS485 support for Nixie and IntelliCenter
|
|
4
|
+
2. Nixie Valve Rotation delay
|
|
5
|
+
3. Nixie Heater Cooldown delay
|
|
6
|
+
4. Nixie Cleaner Start delay
|
|
7
|
+
5. Nixie Cleaner Shutdown on Solar
|
|
8
|
+
6. Nixie Delay Cancel
|
|
9
|
+
|
|
10
|
+
## 7.5.1
|
|
11
|
+
1. Backup/restore fixes
|
|
12
|
+
2. Egg timer expiration
|
|
13
|
+
3. Bug Fixes
|
|
14
|
+
4. dashPanel/messageManager Filter
|
|
15
|
+
5. RS485 refactor
|
|
16
|
+
|
|
17
|
+
## 7.5
|
|
18
|
+
1. Backup/restore
|
|
19
|
+
2. Intellitouch add expansion modules
|
|
20
|
+
## 7.4
|
|
21
|
+
1. Filter object, emit, monitoring
|
|
22
|
+
|
|
23
|
+
## 7.3.1
|
|
24
|
+
1. Influx 2.0 support
|
|
25
|
+
|
|
26
|
+
## 7.3
|
|
27
|
+
1. Dynamic chlorinating % based on ORP demand for Nixie
|
|
28
|
+
2. Docker creation updates
|
|
29
|
+
|
|
30
|
+
## 7.2
|
|
31
|
+
1. Refactor Intellichem and Chem Controllers
|
|
32
|
+
|
|
33
|
+
## 7.1.1
|
|
34
|
+
1. Added end time for circuits to show eggtimer/schedule off times
|
|
35
|
+
2. Ultratemp updates
|
|
36
|
+
3. Heater logic refactored
|
|
37
|
+
4. Message response logic refactored
|
|
38
|
+
5. Intellichem updates
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## 7.1.0
|
|
42
|
+
1. Moved virtual chlorinator code and control to Nixie
|
|
43
|
+
2. Moved virtual pump code and control to Nixie; Nixie supports SS, DS, SuperFlo, VS, VF, VSF
|
|
44
|
+
3. MQTT changes
|
|
45
|
+
4. Outbound processing for packets now has a scope. Previously if an outbound packet would receive a response we would clear all of the similar packets off the queue. EG if a user requests circuit 2 and 3 to be turned on, we would clear out the outbound message for 3. Now the code is more selective about what "scope" is considered for a successful response.
|
|
46
|
+
|
|
47
|
+
## 7.0.0
|
|
48
|
+
1. Upgrades to setup/sync between njsPC and REM
|
|
49
|
+
2. Significant steps to njsPC (Nixie) acting as a standalone pool controller (virtual controller heaters, move virtual controller code, etc.)
|
|
50
|
+
3. Dependency updates (Typescript 4, Socket.io 4, etc)
|
|
51
|
+
|
|
52
|
+
## 6.5.2
|
|
53
|
+
1. Bug Fixes
|
|
54
|
+
2. Schedule updates
|
|
55
|
+
3. MQTT Binding updates
|
|
56
|
+
4. LSI calcs for REM (in addition to CSI)
|
|
57
|
+
|
|
58
|
+
## 6.5.1
|
|
59
|
+
1. Init Touch bodies upon startup
|
|
60
|
+
2. *Touch chlorinator fixes
|
|
61
|
+
3. MQTT updates
|
|
62
|
+
|
|
63
|
+
## 6.5.0
|
|
64
|
+
1. Full compatibility with REM (Relay Equipment Manager) for hardware control (ph sensors, orp sensors, pumps, relays, flow sensors)
|
|
65
|
+
1. Upgrades to Influx binding
|
|
66
|
+
1. MQTT alternate bindings
|
|
67
|
+
1. Many, many bug fixes
|
|
68
|
+
|
|
69
|
+
## 6.1.0
|
|
70
|
+
1. Chem controller
|
|
71
|
+
1. MQTT native support
|
|
72
|
+
1. Server based time for *Touch and other non-internet based OCP
|
|
73
|
+
1. Version notifications
|
|
74
|
+
1. IntelliCenter updates for dual bodies, 1.045/1.047 (partial) support
|
|
75
|
+
1. Many bug fixes
|
|
76
|
+
|
|
77
|
+
## 6.0.1
|
|
78
|
+
1. Implement https (no basic auth yet)
|
|
79
|
+
1. API documentation @ https://tagyoureit.github.io/nodejs-poolcontroller-api/
|
|
80
|
+
1. Add timestamp to logs for API calls
|
|
81
|
+
1. #200, #202
|
|
82
|
+
|
|
83
|
+
## 6.0
|
|
84
|
+
What's new in 6.0?s
|
|
85
|
+
|
|
86
|
+
In short, everything! 6.0 is a complete re-write of the application. Huge props to @rstrouse for his wisdom and guidance in refactoring the code.
|
|
87
|
+
|
|
88
|
+
1. IntelliCenter - now supported
|
|
89
|
+
1. Configuring and running the app - all new. Start over with the Installation instructions.
|
|
90
|
+
1. Automatic detection of your pool equipment. Previous versions of the app would detect the configuration of your pool but you still had to tell the app if you had IntelliTouch/EasyTouch/IntelliCom. This is now done automatically.
|
|
91
|
+
1. Configuration and state information. Config.json now only stores information related to the configuration of the app. There are separate files in the /data directory that store (and persist) pool configuration and state information.
|
|
92
|
+
1. API's - completely changed. See separate API documentation (*link here)
|
|
93
|
+
1. Outbound Sockets - Now more granular to make the web app more responsive
|
|
94
|
+
1. Web app - Now a separate installion for a true client/server metaphore.
|
|
95
|
+
1. Node v12+
|
|
96
|
+
1. `Integrations` are now called `Bindings`. Any integration built on 5.3 need to be upgraded to the binding format. See Readme for a list of currently upgraded bindings.
|
|
97
|
+
|
|
98
|
+
## 5.3.3
|
|
99
|
+
#134
|
|
100
|
+
|
|
101
|
+
## 5.3.1
|
|
102
|
+
#132
|
|
103
|
+
|
|
104
|
+
## 5.3.0
|
|
105
|
+
Fix for #106
|
|
106
|
+
Fix for "Error 60" messages
|
|
107
|
+
Improved caching of files on browsers. Thanks @arrmo! Now files will be loaded once in the browser and kept in cache instead of reloaded each time.
|
|
108
|
+
Improved handling of sessions and graceful closing of the HTTP(s) servers.
|
|
109
|
+
|
|
110
|
+
## 5.2.0
|
|
111
|
+
1. Node 6+ is supported. This app no longer supports Node 4.
|
|
112
|
+
1. Update of modules. Make sure to run `npm i` or `npm upgrade` to get the latest.
|
|
113
|
+
1. Much better support of multiple Intellibrite controllers. We can read both controllers now. There are still some issues with sending changes and help is needed to debug these.
|
|
114
|
+
1. Chlorinator API calls (and UI) will now make changes through Intellitouch when available, or directly to the Intellichlor if it is standalone (aka using the virtual controller)
|
|
115
|
+
1. Decoupled serial port and processing of packets. Should help recovery upon packet errors.
|
|
116
|
+
1. Implementation of #89. Expansion boards are now (better) supported by setting variables in your config.json. See the [config.json](#module_nodejs-poolController--config) section below.
|
|
117
|
+
1. Fix for #95
|
|
118
|
+
1. Fix for #99
|
|
119
|
+
1. Fix for #100
|
|
120
|
+
|
|
121
|
+
## 5.1.1 -
|
|
122
|
+
1. Renamed all 'valves' items to valve to be in line with singular renaming of items
|
|
123
|
+
1. InfluxDB - moved some items that were in tag fields to field keys; added valves
|
|
124
|
+
1. Added days of week (with editing) back to the schedules. Not sure when they disappeared, but they are back now. #92
|
|
125
|
+
1. Added MySQL integration to log all packets to a DB
|
|
126
|
+
1. Fixed PR #95 to allow sub-hour egg timers
|
|
127
|
+
1. Fixed Intellibrite bugs
|
|
128
|
+
1. Started to move some of the inter-communications to emitter events for better micro-services and shorter call stacks (easier debugging; loosely coupled code).
|
|
129
|
+
1. Changed some Influx tags/queries.
|
|
130
|
+
|
|
131
|
+
## 5.1.0 -
|
|
132
|
+
1. Intellibrite support - API's, Sockets and a WebUI. Lights should have the 'Intellbrite' an their circuit function (set this up at the controller) to show up in this section.
|
|
133
|
+
Will document more later, but...
|
|
134
|
+
/light/mode/:mode
|
|
135
|
+
/light/circuit/:circuit/setColor/:color
|
|
136
|
+
/light/circuit/:circuit/setSwimDelay/:delay
|
|
137
|
+
/light/circuit/:circuit/setPosition/:position
|
|
138
|
+
|
|
139
|
+
See the constants.js file and the sections:
|
|
140
|
+
strIntellibriteModes (for modes)
|
|
141
|
+
lightColors (for setColor)
|
|
142
|
+
|
|
143
|
+
## 5.0.1 -
|
|
144
|
+
1. Fixed Influx error on startup #90
|
|
145
|
+
1. Fixed bad characters in custom names
|
|
146
|
+
|
|
147
|
+
## 5.0.0 -
|
|
148
|
+
Make sure to run `npm upgrade`. There are many package updates and changes.
|
|
149
|
+
|
|
150
|
+
* Added add/delete/edit schedule
|
|
151
|
+
* All sockets/API now singular (`circuits`->`circuit`)
|
|
152
|
+
* All sockets/API data now returned with a JSON qualifier. EG `{pump:...}`, `{circuit:...}`
|
|
153
|
+
* Intellichem decoding and display
|
|
154
|
+
* Changes to `/config` endpoint. It's now included with the `/all` end point since there would be quite a bit of duplication. It still exists standalone (for now) but has much less information in it.
|
|
155
|
+
* Moved `hideAux` setting from `configClient.json` (web UI settings) to `config.json` template. In `config.json` template, moved
|
|
156
|
+
```
|
|
157
|
+
{equipment: {controller: {circuitFriendlyNames:{1..20}}}}
|
|
158
|
+
|
|
159
|
+
// to
|
|
160
|
+
|
|
161
|
+
{equipment: {circuit: friendlyName:{1..20},
|
|
162
|
+
hideAux: boolean
|
|
163
|
+
},
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
to be in line with the other equipment in the pool setup and accomodate the `hideAux` setting.
|
|
167
|
+
|
|
168
|
+
* Fixed issue #82
|
|
169
|
+
* Extra info from `/config` was being added to the circuit section in `config.json`
|
|
170
|
+
* This release includes a new mechanism for updating config.json files. See notes in [config.json](#module_nodejs-poolController--config) section.
|
|
171
|
+
* mDNS server. Currently included for SmartThings integration, but in the future can be used for autodiscovery by other applications/devices.
|
|
172
|
+
* New `/config` endpoint (beta) to allow applications to get a high level summary of the system.
|
|
173
|
+
* Support for two separate (http/https) web servers, each/both with Auth, and also the option to redirect all http to https traffic. Thanks to @arrmo for driving this with #65 and #68.
|
|
174
|
+
* A UI for standalone pumps
|
|
175
|
+
* All sockets and API's renamed to be SINGULAR. Circuits -> circuit, Schedules->schedule, etc.
|
|
176
|
+
* All returned JSON data (API/socket) now has the type qualifier per [#57](https://github.com/tagyoureit/nodejs-poolController/issues/57)
|
|
177
|
+
* Make sure to run `npm upgrade`. There are many package updates and changes.
|
|
178
|
+
* Intellichem initial support.
|
|
179
|
+
* Inactivity timer for both internal connections and web page connections. If a connection is broken, it should re-establish itself automatically now.
|
|
180
|
+
* SSDP for auto-discovery by SmartThings or other services
|
|
181
|
+
|
|
182
|
+
## 4.0.0 -
|
|
183
|
+
* Changed much in the config.json file
|
|
184
|
+
* Save pump programs and chlorinator level to config.json
|
|
185
|
+
* Added support for GPM with pumps
|
|
186
|
+
* Check for newer versions of the app on github, and dismiss notifications until next release
|
|
187
|
+
* Bootstrap configuration is automatically saved in clientConfig.json via UI actions
|
|
188
|
+
* Started to introduce some promises into the workflow (mostly with read/write operations)
|
|
189
|
+
* Added log-to-file option
|
|
190
|
+
* Added capture for Ctrl-C/SIGINT to have a clean exit
|
|
191
|
+
* Added InfluxDB database capabilities
|
|
192
|
+
* Added support for reading the data from up to 16 pumps. (You can still only control two.)
|
|
193
|
+
* Support for up to 50 circuits, 8 pumps
|
|
194
|
+
* Delay and Cancel Delay for circuits
|
|
195
|
+
|
|
196
|
+
## 3.1.x -
|
|
197
|
+
* Added unit testing for certain areas
|
|
198
|
+
* Added setDateTime API/Socket
|
|
199
|
+
* Bootstrap panel states are now persistent
|
|
200
|
+
|
|
201
|
+
## 3.0.0 -
|
|
202
|
+
* Upgraded pump logic
|
|
203
|
+
|
|
204
|
+
## 2.0.0 -
|
|
205
|
+
* https, Authentication
|
|
206
|
+
* Completely refactored code. Integrated BottleJS (https://github.com/young-steveo/bottlejs) for dependency injection and service locator functions
|
|
207
|
+
* Integrations to loosely couple add-ons
|
|
208
|
+
|
|
209
|
+
## 1.0.0 -
|
|
210
|
+
* Much of the code reworked and refactored
|
|
211
|
+
* Added Bootstrap UI by @arrmo
|
|
212
|
+
* Better standalone pump control (@bluemantwo was super-helpful here, too!)
|
|
213
|
+
* More accurate recognition of packets
|
|
214
|
+
* Super fast speed improvements
|
|
215
|
+
* Outgoing packets are now sent based on a timer (previously number of incoming packets)
|
|
196
216
|
* Added ISY support (@bluemantwo was super-helpful here, too!)
|
package/Dockerfile
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
FROM node:lts-
|
|
2
|
-
RUN apk add --no-cache make gcc g++
|
|
3
|
-
WORKDIR /app
|
|
4
|
-
COPY package*.json ./
|
|
5
|
-
RUN npm ci
|
|
6
|
-
COPY . .
|
|
7
|
-
RUN npm run build
|
|
8
|
-
RUN npm ci --production
|
|
9
|
-
|
|
10
|
-
FROM node:lts-
|
|
11
|
-
RUN apk add git
|
|
12
|
-
RUN mkdir /app && chown node:node /app
|
|
13
|
-
WORKDIR /app
|
|
14
|
-
COPY --chown=node:node --from=build /app .
|
|
15
|
-
USER node
|
|
16
|
-
ENV NODE_ENV=production
|
|
17
|
-
ENTRYPOINT ["node", "dist/app.js"]
|
|
1
|
+
FROM node:lts-alpine3.12 AS build
|
|
2
|
+
RUN apk add --no-cache make gcc g++ python3 linux-headers udev tzdata
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
COPY package*.json ./
|
|
5
|
+
RUN npm ci
|
|
6
|
+
COPY . .
|
|
7
|
+
RUN npm run build
|
|
8
|
+
RUN npm ci --production
|
|
9
|
+
|
|
10
|
+
FROM node:lts-alpine3.12 as prod
|
|
11
|
+
RUN apk add git
|
|
12
|
+
RUN mkdir /app && chown node:node /app
|
|
13
|
+
WORKDIR /app
|
|
14
|
+
COPY --chown=node:node --from=build /app .
|
|
15
|
+
USER node
|
|
16
|
+
ENV NODE_ENV=production
|
|
17
|
+
ENTRYPOINT ["node", "dist/app.js"]
|
package/Gruntfile.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
module.exports = function(grunt) {
|
|
2
|
-
|
|
3
|
-
grunt.initConfig({
|
|
4
|
-
usebanner: {
|
|
5
|
-
taskName: {
|
|
6
|
-
options: {
|
|
7
|
-
position: 'top',
|
|
8
|
-
banner: `/* nodejs-poolController. An application to control pool equipment.
|
|
9
|
-
Copyright (C) 2016, 2017. Russell Goldin, tagyoureit. russ.goldin@gmail.com
|
|
10
|
-
|
|
11
|
-
This program is free software: you can redistribute it and/or modify
|
|
12
|
-
it under the terms of the GNU Affero General Public License as
|
|
13
|
-
published by the Free Software Foundation, either version 3 of the
|
|
14
|
-
License, or (at your option) any later version.
|
|
15
|
-
|
|
16
|
-
This program is distributed in the hope that it will be useful,
|
|
17
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
GNU Affero General Public License for more details.
|
|
20
|
-
|
|
21
|
-
You should have received a copy of the GNU Affero General Public License
|
|
22
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
-
*/`,
|
|
24
|
-
linebreak: true,
|
|
25
|
-
replace: false
|
|
26
|
-
},
|
|
27
|
-
files: {
|
|
28
|
-
src: [ 'config/*.ts', 'controller/**/*.ts', 'logger/*.ts', 'web/**/*.ts', 'app.ts' ]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
grunt.loadNpmTasks('grunt-banner');
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
module.exports = function(grunt) {
|
|
2
|
+
|
|
3
|
+
grunt.initConfig({
|
|
4
|
+
usebanner: {
|
|
5
|
+
taskName: {
|
|
6
|
+
options: {
|
|
7
|
+
position: 'top',
|
|
8
|
+
banner: `/* nodejs-poolController. An application to control pool equipment.
|
|
9
|
+
Copyright (C) 2016, 2017. Russell Goldin, tagyoureit. russ.goldin@gmail.com
|
|
10
|
+
|
|
11
|
+
This program is free software: you can redistribute it and/or modify
|
|
12
|
+
it under the terms of the GNU Affero General Public License as
|
|
13
|
+
published by the Free Software Foundation, either version 3 of the
|
|
14
|
+
License, or (at your option) any later version.
|
|
15
|
+
|
|
16
|
+
This program is distributed in the hope that it will be useful,
|
|
17
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
GNU Affero General Public License for more details.
|
|
20
|
+
|
|
21
|
+
You should have received a copy of the GNU Affero General Public License
|
|
22
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/`,
|
|
24
|
+
linebreak: true,
|
|
25
|
+
replace: false
|
|
26
|
+
},
|
|
27
|
+
files: {
|
|
28
|
+
src: [ 'config/*.ts', 'controller/**/*.ts', 'logger/*.ts', 'web/**/*.ts', 'app.ts' ]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
grunt.loadNpmTasks('grunt-banner');
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
41
|
|