Skip to content

Commit

Permalink
Add Docker support
Browse files Browse the repository at this point in the history
Pool and frontend can be built and run as docker containers. An example docker-compose.yml is included.
  • Loading branch information
salanki committed Nov 8, 2018
1 parent 38c4148 commit ab54eac
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM golang:1.11

RUN mkdir -p /app
WORKDIR /app

COPY ./ /app

RUN make

CMD ./build/bin/open-ethereum-pool ./config.json
54 changes: 54 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: '2'
services:
proxy:
build: pool/open-ethereum-pool/
restart: always
ports:
- 3333:3333
volumes:
- ./proxy.json:/app/config.json
links:
- redis

api:
build: ./
restart: always
ports:
- 8181:8181
volumes:
- ./api.json:/app/config.json

unlocker:
build: pool/open-ethereum-pool/
restart: always
volumes:
- ./unlocker.json:/app/config.json

payouts:
build: pool/open-ethereum-pool/
restart: always
volumes:
- ./payouts.json:/app/config.json

web-builder:
build: www/
volumes:
- ./www-dist:/app/dist

web-development:
build: www/
volumes:
- ./www:/app
command: ember server --port 8082 --environment development

redis:
image: redis:latest
restart: always
ports:
- 6379:6379
volumes:
- redis:/data
command: redis-server --appendonly yes

volumes:
redis:
17 changes: 17 additions & 0 deletions www/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:11.1.0-alpine

RUN apk add git

RUN mkdir -p /app
WORKDIR /app

COPY ./ /app

VOLUME /app/www/dist

RUN npm install -g ember-cli@2.9.1
RUN npm install -g bower
RUN npm install
RUN bower --allow-root install

CMD ./build.sh
2 changes: 1 addition & 1 deletion www/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/bin/sh

./node_modules/.bin/ember build --environment production

0 comments on commit ab54eac

Please sign in to comment.