aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.dockerignore3
-rw-r--r--Dockerfile22
-rw-r--r--docker-compose.yml11
-rw-r--r--mascara/server/index.js8
4 files changed, 40 insertions, 4 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..ea6720feb
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,3 @@
+node_modules
+builds
+development \ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..d06f5377b
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,22 @@
+FROM node:6
+MAINTAINER kumavis
+
+# setup app dir
+RUN mkdir -p /www/
+WORKDIR /www/
+
+# install dependencies
+COPY ./package.json /www/package.json
+RUN npm install
+
+# copy over app dir
+COPY ./ /www/
+
+# run tests
+# RUN npm test
+
+# build app
+RUN npm run dist
+
+# start server
+CMD node mascara/example/server.js
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 000000000..58c046c32
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,11 @@
+metamascara:
+ build: ./
+ restart: always
+ ports:
+ - "9001"
+ environment:
+ MASCARA_ORIGIN: "https://zero.metamask.io"
+ VIRTUAL_PORT: "9001"
+ VIRTUAL_HOST: "zero.metamask.io"
+ LETSENCRYPT_HOST: "zero.metamask.io"
+ LETSENCRYPT_EMAIL: "admin@metamask.io" \ No newline at end of file
diff --git a/mascara/server/index.js b/mascara/server/index.js
index 9fd664eee..14e3fa18e 100644
--- a/mascara/server/index.js
+++ b/mascara/server/index.js
@@ -8,10 +8,10 @@ module.exports = createMetamascaraServer
function createMetamascaraServer(){
// start bundlers
- const metamascaraBundle = createBundle('./src/mascara.js')
- const proxyBundle = createBundle('./src/proxy.js')
- const uiBundle = createBundle('./src/ui.js')
- const backgroundBuild = createBundle('./src/background.js')
+ const metamascaraBundle = createBundle(__dirname + '/../src/mascara.js')
+ const proxyBundle = createBundle(__dirname + '/../src/proxy.js')
+ const uiBundle = createBundle(__dirname + '/../src/ui.js')
+ const backgroundBuild = createBundle(__dirname + '/../src/background.js')
// serve bundles
const server = express()