aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-04-06 13:59:25 +0800
committerkumavis <aaron@kumavis.me>2017-04-06 13:59:25 +0800
commit4b8324620e4f850b1674692cf8c45a4ca70101b4 (patch)
tree92f754486e956a1984ae6a65031031d8c5844654
parenta6c6ecf2759d300f660da4e9058b29a0f5f07a8b (diff)
downloadtangerine-wallet-browser-4b8324620e4f850b1674692cf8c45a4ca70101b4.tar
tangerine-wallet-browser-4b8324620e4f850b1674692cf8c45a4ca70101b4.tar.gz
tangerine-wallet-browser-4b8324620e4f850b1674692cf8c45a4ca70101b4.tar.bz2
tangerine-wallet-browser-4b8324620e4f850b1674692cf8c45a4ca70101b4.tar.lz
tangerine-wallet-browser-4b8324620e4f850b1674692cf8c45a4ca70101b4.tar.xz
tangerine-wallet-browser-4b8324620e4f850b1674692cf8c45a4ca70101b4.tar.zst
tangerine-wallet-browser-4b8324620e4f850b1674692cf8c45a4ca70101b4.zip
mascara - ready to deploy via docker
-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()