]> git.r.bdr.sh - rbdr/tomato-sauce/commitdiff
Add new port rbdr-update
authorRuben Beltran del Rio <redacted>
Sun, 8 May 2022 19:19:04 +0000 (21:19 +0200)
committerRuben Beltran del Rio <redacted>
Sun, 8 May 2022 19:19:04 +0000 (21:19 +0200)
Dockerfile [new file with mode: 0644]
Makefile [new file with mode: 0644]
bin/tomato_sauce.js
docker-compose.yml [new file with mode: 0644]
package.json

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..0c8fcbb
--- /dev/null
@@ -0,0 +1,13 @@
+FROM node:16-slim
+
+WORKDIR /app
+
+COPY package-lock.json .
+COPY package.json .
+RUN npm ci
+
+COPY . .
+
+ENTRYPOINT ["npm"]
+
+CMD ["start"]
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..fdfeaa8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,9 @@
+environment = development
+
+default: start
+
+start:
+       docker-compose up
+
+update-dependencies:
+       docker-compose run tomato-sauce install
index b8675dae868beaefac89f0f9d7b566b90bb98252..524c3614bf78fb277c4d398961c853961c59b2c9 100755 (executable)
@@ -11,7 +11,7 @@ const TomatoSauce = require('..');
 const Util = require('../lib/util');
 
 const config = {
 const Util = require('../lib/util');
 
 const config = {
-    port: Getenv.int('TOMATO_SAUCE_PORT', 9999),
+    port: Getenv.int('TOMATO_SAUCE_PORT', 7777),
     frequency: Getenv.int('TOMATO_SAUCE_FREQUENCY', 333),
     modulation: Getenv.int('TOMATO_SAUCE_MODULATION_SPEED', 5)
 };
     frequency: Getenv.int('TOMATO_SAUCE_FREQUENCY', 333),
     modulation: Getenv.int('TOMATO_SAUCE_MODULATION_SPEED', 5)
 };
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644 (file)
index 0000000..416ea04
--- /dev/null
@@ -0,0 +1,11 @@
+version: '3.8'
+
+services:
+  tomato-sauce:
+    build: .
+    command: run start
+    volumes:
+      - /app/node_modules
+      - .:/app
+    ports:
+      - "7777:7777"
index 5c67914d65432dece936334bee4e3daa7df5b537..9bfb5ba4304e13d8d6c9c3716e48cecb4edf8286 100644 (file)
@@ -5,8 +5,7 @@
   "main": "lib/tomato_sauce.js",
   "scripts": {
     "document": "jsdoc2md -f 'lib/**/*.js' > doc/README.md",
   "main": "lib/tomato_sauce.js",
   "scripts": {
     "document": "jsdoc2md -f 'lib/**/*.js' > doc/README.md",
-    "lint": "eslint lib bin",
-    "test": "I'm really really sorry! && exit 1",
+    "lint": "eslint .",
     "start": "bin/tomato_sauce.js"
   },
   "repository": {
     "start": "bin/tomato_sauce.js"
   },
   "repository": {