Skip to content

Commit 565d9c8

Browse files
add docker containers from subgraph
1 parent 39cb1d9 commit 565d9c8

File tree

5 files changed

+9240
-779
lines changed

5 files changed

+9240
-779
lines changed

docker-compose.yml

Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# A composition of services that are needed to run Alchemy
2+
# This is for DEVELOPMENT, not production
3+
14
version: "3"
25
services:
36
alchemy:
@@ -18,27 +21,77 @@ services:
1821
- ./entry.sh:/entry.sh
1922
ports:
2023
- 3000:3000
21-
- 8545:8545
24+
- 8546:8545
2225
# ganache:
2326
# image: daostack/ganache:0.0.0-alpha.50-v3
2427
# command: --hostname=0.0.0.0
2528
alchemy-server:
2629
build:
27-
dockerfile: alchemy-server.dockerfile
2830
context: ./docker/alchemy-server
2931
depends_on:
30-
- postgres
32+
- postgres4alchemyserver
3133
links:
32-
- postgres
34+
- postgres4alchemyserver
3335
ports:
3436
- 3001:3001
3537
working_dir: /alchemy-server/
3638
environment:
37-
WAIT_HOSTS: postgres:5432
39+
WAIT_HOSTS: postgres4alchemyserver:5432
3840

39-
postgres:
41+
postgres4alchemyserver:
4042
build:
41-
dockerfile: postgres.dockerfile
4243
context: ./docker/postgres/
4344
ports:
4445
- 5433:5432
46+
subgraph:
47+
build:
48+
context: ./node_modules/@daostack/subgraph
49+
links:
50+
- ipfs
51+
- graph-node
52+
- ganache
53+
environment:
54+
ethereum: http://ganache:8545
55+
test_mnemonic: behave pipe turkey animal voyage dial relief menu blush match jeans general
56+
node_http: http://graph-node:8000/by-name/daostack/graphql
57+
node_ws: http://graph-node:8001/by-name/daostack
58+
node_rpc: http://graph-node:8020
59+
ipfs_host: ipfs
60+
ipfs_port: 5001
61+
WAIT_HOSTS: ipfs:5001, graph-node:8020
62+
graph-node:
63+
image: graphprotocol/graph-node:v0.4.1
64+
ports:
65+
- 8000:8000
66+
- 8001:8001
67+
- 8020:8020
68+
links:
69+
- ipfs
70+
- postgres4graphnode
71+
- ganache
72+
environment:
73+
postgres_host: postgres4graphnode:5432
74+
postgres_user: postgres
75+
postgres_pass: 'letmein'
76+
postgres_db: postgres
77+
ipfs: ipfs:5001
78+
ethereum: development:http://ganache:8545
79+
ipfs:
80+
image: ipfs/go-ipfs
81+
ports:
82+
- 5001:5001
83+
postgres4graphnode:
84+
image: postgres
85+
ports:
86+
- 5435:5432
87+
environment:
88+
POSTGRES_PASSWORD: 'letmein'
89+
ganache:
90+
image: trufflesuite/ganache-cli:v6.2.1
91+
ports:
92+
- 8545:8545
93+
command: >
94+
--deterministic
95+
--mnemonic "behave pipe turkey animal voyage dial relief menu blush match jeans general"
96+
--gasLimit 8000000
97+
--networkId 1543492792088

docker/alchemy-server/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:10.13.0
2+
3+
RUN apt install git
4+
RUN git clone https://github.com/daostack/alchemy-server.git
5+
ADD datasources.json /alchemy-server/server
6+
RUN cd alchemy-server && npm install
7+
8+
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.4.0/wait /wait
9+
10+
ADD entry.sh /entry.sh
11+
RUN chmod +x /wait /entry.sh
12+
ENTRYPOINT [ "/entry.sh" ]

docker/postgres/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM postgres
2+
COPY ./docker-entrypoint-initdb.d/init-db.sh /docker-entrypoint-initdb.d/

0 commit comments

Comments
 (0)