-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from stakewise/feature/oracle-v2-subgraphs
docker-compose refactoring
- Loading branch information
Showing
8 changed files
with
154 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,180 @@ | ||
version: '3.1' | ||
version: "3.9" | ||
|
||
volumes: | ||
prometheus: | ||
driver: local | ||
alertmanager: | ||
driver: local | ||
postgres: | ||
driver: local | ||
ipfs: | ||
driver: local | ||
geth: | ||
driver: local | ||
erigon: | ||
driver: local | ||
prysm: | ||
driver: local | ||
lighthouse: | ||
driver: local | ||
|
||
services: | ||
oracle: | ||
build: | ||
context: ./../ | ||
dockerfile: Dockerfile | ||
container_name: oracle | ||
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:feature-oracle-v2 | ||
restart: always | ||
entrypoint: ["python"] | ||
command: ["oracle/oracle/main.py"] | ||
env_file: | ||
- .env | ||
|
||
# keeper: | ||
# build: | ||
# context: ./../ | ||
# dockerfile: Dockerfile | ||
# restart: always | ||
# entrypoint: ["python"] | ||
# command: ["oracle/keeper/main.py"] | ||
# env_file: | ||
# - .env | ||
env_file: [".env"] | ||
profiles: ["oracle"] | ||
|
||
keeper: | ||
container_name: keeper | ||
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:feature-oracle-v2 | ||
restart: always | ||
entrypoint: ["python"] | ||
command: ["oracle/keeper/main.py"] | ||
env_file: [".env"] | ||
profiles: ["keeper"] | ||
|
||
prometheus: | ||
container_name: prometheus | ||
image: bitnami/prometheus:2 | ||
restart: always | ||
env_file: | ||
- .env | ||
env_file: [".env"] | ||
volumes: | ||
- prometheus:/opt/bitnami/prometheus/data | ||
- ./configs/prometheus.yml:/opt/bitnami/prometheus/conf/prometheus.yml | ||
- ./configs/rules.yml:/opt/bitnami/prometheus/conf/rules.yml | ||
# depends_on: | ||
# - keeper | ||
|
||
alertmanager: | ||
container_name: alertmanager | ||
image: bitnami/alertmanager:0 | ||
restart: always | ||
ports: | ||
- '127.0.0.1:9093:9093' | ||
env_file: | ||
- .env | ||
ports: ["127.0.0.1:9093:9093"] | ||
env_file: [".env"] | ||
volumes: | ||
- alertmanager:/opt/bitnami/alertmanager/data | ||
- ./configs/alertmanager.yml:/opt/bitnami/alertmanager/conf/config.yml | ||
depends_on: | ||
- prometheus | ||
depends_on: ["prometheus"] | ||
|
||
graph-node: | ||
container_name: graph-node | ||
image: graphprotocol/graph-node:v0.24.2 | ||
restart: always | ||
env_file: [".env"] | ||
depends_on: ["postgres","ipfs"] | ||
profiles: ["graph"] | ||
|
||
postgres: | ||
container_name: postgres | ||
image: postgres:14-alpine | ||
restart: always | ||
command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"] | ||
env_file: [".env"] | ||
volumes: ["postgres:/var/lib/postgresql/data"] | ||
profiles: ["graph"] | ||
|
||
subgraphs: | ||
container_name: subgraphs | ||
image: europe-west4-docker.pkg.dev/stakewiselabs/public/subgraphs:v1.0.0 | ||
command: > | ||
/bin/sh -c "until nc -vz graph-node 8020; do echo 'Waiting graph-node'; sleep 2; done | ||
&& yarn prepare:${NETWORK} | ||
&& yarn codegen | ||
&& yarn build | ||
&& yarn create:local | ||
&& yarn deploy:local" | ||
env_file: [".env"] | ||
restart: "no" | ||
depends_on: ["graph-node","ipfs"] | ||
profiles: ["graph"] | ||
|
||
ipfs: | ||
container_name: ipfs | ||
image: ipfs/go-ipfs:v0.10.0 | ||
restart: always | ||
env_file: [".env"] | ||
ulimits: | ||
nofile: | ||
soft: 8192 | ||
hard: 8192 | ||
volumes: ["ipfs:/data/ipfs","./configs/ipfs-entrypoint.sh:/usr/local/bin/start_ipfs"] | ||
profiles: ["graph"] | ||
|
||
geth: | ||
container_name: geth | ||
image: ethereum/client-go:v1.10.13 | ||
restart: always | ||
command: | ||
- --syncmode=full | ||
- --http | ||
- --http.addr=0.0.0.0 | ||
- --http.vhosts=* | ||
- --http.api=web3,eth,net | ||
- --datadir=/data/ethereum | ||
- --ethash.dagdir=/data/ethereum/.ethash | ||
- --ipcdisable | ||
volumes: ["geth:/data"] | ||
profiles: ["geth"] | ||
|
||
erigon: | ||
container_name: erigon | ||
image: thorax/erigon:v2021.12.02 | ||
restart: always | ||
command: | ||
- erigon | ||
- --private.api.addr=0.0.0.0:9090 | ||
- --maxpeers=100 | ||
- --datadir=/home/erigon/.local/share/erigon | ||
- --batchSize=512M | ||
- --prune.r.before=11184524 | ||
- --prune=htc | ||
volumes: ["erigon:/home/erigon/.local/share/erigon"] | ||
profiles: ["erigon"] | ||
|
||
erigon-rpcdaemon: | ||
container_name: erigon-rpcdaemon | ||
image: thorax/erigon:v2021.12.02 | ||
restart: always | ||
command: | ||
- rpcdaemon | ||
- --private.api.addr=erigon:9090 | ||
- --http.addr=0.0.0.0 | ||
- --http.vhosts=* | ||
- --http.corsdomain=* | ||
- --http.api=eth,erigon,web3,net,txpool | ||
- --ws | ||
depends_on: ["erigon"] | ||
profiles: ["erigon"] | ||
|
||
prysm: | ||
container_name: prysm | ||
image: gcr.io/prysmaticlabs/prysm/beacon-chain:v2.0.5 | ||
restart: always | ||
command: | ||
- --datadir=/data | ||
- --rpc-host=0.0.0.0 | ||
- --monitoring-host=0.0.0.0 | ||
- --http-web3provider=http://geth:8545 | ||
- --slots-per-archive-point=64 | ||
- --accept-terms-of-use | ||
volumes: ["prysm:/data"] | ||
profiles: ["prysm"] | ||
|
||
lighthouse: | ||
container_name: lighthouse | ||
image: sigp/lighthouse:v2.0.1 | ||
restart: always | ||
command: | ||
- lighthouse | ||
- --network | ||
- mainnet | ||
- beacon | ||
- --http | ||
- --http-address | ||
- 0.0.0.0 | ||
- --eth1-endpoints | ||
- http://geth:8545 | ||
volumes: ["lighthouse:/root/.lighthouse"] | ||
profiles: ["lighthouse"] |