aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile13
-rw-r--r--Makefile9
-rwxr-xr-xbin/tomato_sauce.js2
-rw-r--r--docker-compose.yml11
-rw-r--r--package.json3
5 files changed, 35 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..0c8fcbb
--- /dev/null
+++ b/Dockerfile
@@ -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
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
diff --git a/bin/tomato_sauce.js b/bin/tomato_sauce.js
index b8675da..524c361 100755
--- a/bin/tomato_sauce.js
+++ b/bin/tomato_sauce.js
@@ -11,7 +11,7 @@ const TomatoSauce = require('..');
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)
};
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..416ea04
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,11 @@
+version: '3.8'
+
+services:
+ tomato-sauce:
+ build: .
+ command: run start
+ volumes:
+ - /app/node_modules
+ - .:/app
+ ports:
+ - "7777:7777"
diff --git a/package.json b/package.json
index 5c67914..9bfb5ba 100644
--- a/package.json
+++ b/package.json
@@ -5,8 +5,7 @@
"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": {