Skip to content

Commit

Permalink
Make frontend composer
Browse files Browse the repository at this point in the history
  • Loading branch information
Herman Junge committed Jun 21, 2018
1 parent 0bd8cbf commit 3fe28e8
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/backend-eth/static-nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"enode://86d0fe2a0f478dce0fc0adb98f88bfe14937d0495b1ba71c443e9c79fe37048682fd5ab83c5f39fcffa26bc1d5c3ffa8ea403ec1ecf4690f2be5b87d34e4a7e6@20.36.20.160:30303",
"enode://8c28bdcd52bfb3a803629af0544bccb040b1707cc07c4711d62507bc3980e0a1b5e6f4a4b3f4701ed41d5d248adbe77327af2601d65d8ddd11ce0918d4c5d054@20.36.20.160:30304",
"enode://4aaf40b72fc57bd2f39e7283189f8c21c24ce96e83efd382a3dc9fc7d42c0c598c83570fb6a4a10bf163525b0c3c4d1ba03435bf5425426e0ae9a6c5952197e0@52.178.93.35:30303",
"enode://e36673e82b749dd4382197be6155ac47c5f1973473b588c045a0dcf1f6b573999eef12543539683c245af0407adf60a7d0c833474becc8ed1ed5a85dcd4a2ee8@52.178.93.35:30303",
"]
"enode://e36673e82b749dd4382197be6155ac47c5f1973473b588c045a0dcf1f6b573999eef12543539683c245af0407adf60a7d0c833474becc8ed1ed5a85dcd4a2ee8@52.178.93.35:30303"
]
52 changes: 52 additions & 0 deletions docker/frontend-nginx-ipld-1/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
nginx-proxy:
build: ./nginx-proxy/.
container_name: nginx-proxy
restart: always
ports:
# 80 should be open to the internet for letsencrypt purposes
- "80:80"
# 443 should be open to the internet for wss
- "443:443"
volumes:
- /home/core/ssl-certs:/etc/nginx/certs:ro
- /etc/nginx/vhost.d
- /usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
DEFAULT_HOST: "kitsunet.metamask.io"

letsencrypt-nginx-proxy-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
restart: always
volumes_from:
- nginx-proxy
volumes:
- /home/core/ssl-certs:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro

ipld-eth-bridge:
build: ../.
container_name: ipld-eth-bridge
restart: always
expose:
# This port is the one that nginx-proxy container will use to redirect calls
# Has to be represented in the environment variable VIRTUAL_PORT below
- "4003"
ports:
# 4001 is the ipfs swarm port
- "4001:4002"
# 5002 should be closed in the machine,
# and is mapped so we can perform local diagnostics with curl
- "5002:5002"
volumes:
- /home/core/ipfs-data:/www/ipfs-repo
links:
- parity
environment:
ETH_HOST: "parity"
ETH_PORT: "5001"
VIRTUAL_HOST: "${HOSTNAME}.kitsunet.metamask.io"
VIRTUAL_PORT: "4003"
LETSENCRYPT_HOST: "${HOSTNAME}.kitsunet.metamask.io"
LETSENCRYPT_EMAIL: "herman.junge@consensys.net"
8 changes: 8 additions & 0 deletions docker/frontend-nginx-ipld-1/nginx-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM jwilder/nginx-proxy

RUN { \
echo 'proxy_connect_timeout 86400;'; \
echo 'proxy_send_timeout 86400;'; \
echo 'proxy_read_timeout 86400;'; \
echo 'send_timeout 86400;'; \
} > /etc/nginx/conf.d/extended_timeout.conf
3 changes: 3 additions & 0 deletions docker/frontend-nginx-ipld-1/run_box
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

HOSTNAME=$HOSTNAME /opt/bin/docker-compose up -d
3 changes: 3 additions & 0 deletions docker/frontend-nginx-ipld-1/stop_box
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

/opt/bin/docker-compose stop && /opt/bin/docker-compose rm -f

0 comments on commit 3fe28e8

Please sign in to comment.