ekardnam 4 years ago
parent
commit
affbbc7c1a
2 changed files with 21 additions and 4 deletions
  1. 18 0
      Dockerfile
  2. 3 4
      package.json

+ 18 - 0
Dockerfile

@@ -0,0 +1,18 @@
+FROM node:10
+
+WORKDIR /usr/src/app
+
+# Install app dependencies
+# A wildcard is used to ensure both package.json AND package-lock.json are copied
+# where available (npm@5+)
+COPY package*.json ./
+
+RUN npm install
+
+# Bundle app source
+COPY . .
+
+# Has to be changed according to config
+EXPOSE 8000
+
+CMD [ "node", "app.js" ]

+ 3 - 4
package.json

@@ -2,10 +2,9 @@
   "name": "xtweet",
   "version": "1.0.0",
   "description": "Cross tweet from Mastodon",
-  "main": "main.js",
-  "scripts": {},
-  "bin": {
-    "xtweet": "app.js"
+  "main": "app.js",
+  "scripts": {
+    "start": "node app.js"
   },
   "repository": {
     "type": "git",