forked from cerc-io/stack-orchestrator
Compare commits
169
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd8c78e1a3 | ||
|
|
fd5779f967 | ||
|
|
d854dd5c81 | ||
|
|
948f9f4287 | ||
|
|
b92d9cd7dd | ||
|
|
86076c7ed8 | ||
|
|
8cac598679 | ||
|
|
6130eab5cb | ||
|
|
f198f43b3a | ||
|
|
36d1e0eedd | ||
|
|
0f5b1a097b | ||
|
|
20d633f81c | ||
|
|
5e36e3e2ae | ||
|
|
f7eb8b9a38 | ||
|
|
5b9b12a223 | ||
|
|
567dadef7d | ||
|
|
052f0df4b0 | ||
|
|
c51671f786 | ||
|
|
573a19a3b7 | ||
|
|
fc051265d8 | ||
|
|
ddebb9c690 | ||
|
|
fe6c3f92ed | ||
|
|
c06be6da81 | ||
|
|
3291c16466 | ||
|
|
69b071ee7a | ||
|
|
4a90cedeb2 | ||
|
|
2402220273 | ||
|
|
771943864e | ||
|
|
dd4dd519dd | ||
|
|
3262ebe4ac | ||
|
|
8246e3551f | ||
|
|
e26a05f2c7 | ||
|
|
f9b102f5fa | ||
|
|
7ce40331d8 | ||
|
|
479a7772f3 | ||
|
|
4030c0a0d2 | ||
|
|
ba09043227 | ||
|
|
99f80ddc7c | ||
|
|
246d3d8732 | ||
|
|
a68abe5f5d | ||
|
|
c3d87692fa | ||
|
|
61579f0434 | ||
|
|
0bec51e96a | ||
|
|
f4216419c4 | ||
|
|
420b1c292b | ||
|
|
1446e54f31 | ||
|
|
2486003361 | ||
|
|
5ec98ee9a1 | ||
|
|
8c4ed24dfc | ||
|
|
9e56f6357d | ||
|
|
8770b1df86 | ||
|
|
889df76f4f | ||
|
|
5d19c56b0c | ||
|
|
d57efe87b8 | ||
|
|
80b0c07736 | ||
|
|
6fa3ca2b6d | ||
|
|
3c5489681f | ||
|
|
cf039d9562 | ||
|
|
b485a3b8d8 | ||
|
|
72dbee88d4 | ||
|
|
33e443f41f | ||
|
|
bc78c5e0d6 | ||
|
|
7fd2439aa9 | ||
|
|
eca5aae991 | ||
|
|
5beaf69a36 | ||
|
|
06c4a77afe | ||
|
|
aafadbbed6 | ||
|
|
be519e9ca0 | ||
|
|
e56a910260 | ||
|
|
e3dc75118b | ||
|
|
e0b5318ebe | ||
|
|
2425aa8556 | ||
|
|
3dc9cd584a | ||
|
|
ed9c253f61 | ||
|
|
bdf4f069b4 | ||
|
|
5f9c3c14b2 | ||
|
|
0b512db693 | ||
|
|
e0ecbc3ab3 | ||
|
|
626cc17373 | ||
|
|
c30c779535 | ||
|
|
3011a485ee | ||
|
|
d505664781 | ||
|
|
4197d39b0c | ||
|
|
8dcebe3737 | ||
|
|
50d17c3282 | ||
|
|
2c930bdbc3 | ||
|
|
f48f4978aa | ||
|
|
e89f7c9526 | ||
|
|
ae9dff553e | ||
|
|
bab3a8dba8 | ||
|
|
e0972033de | ||
|
|
b5988fba8f | ||
|
|
53ed18b3dc | ||
|
|
d3c26948fc | ||
|
|
7f9b556f9d | ||
|
|
125af19890 | ||
|
|
7797185d07 | ||
|
|
f55a14bd6c | ||
|
|
f411590452 | ||
|
|
97dc45549d | ||
|
|
8a7622ffa9 | ||
|
|
d35bbbab98 | ||
|
|
407571e18d | ||
|
|
d39e2e959e | ||
|
|
ddaddd2a8c | ||
|
|
59e0458c74 | ||
|
|
18e45af463 | ||
|
|
fd78935fe6 | ||
|
|
4c72acea96 | ||
|
|
bccf711206 | ||
|
|
333797b0c3 | ||
|
|
dc7bc6af31 | ||
|
|
d6bd99252d | ||
|
|
d30e746599 | ||
|
|
73e52c4eed | ||
|
|
e856616be8 | ||
|
|
2da03d7ed1 | ||
|
|
6a0a752e2e | ||
|
|
5afe7a29ae | ||
|
|
a8f4e4cee4 | ||
|
|
45ba1f337f | ||
|
|
0feeab6418 | ||
|
|
4ee745a4db | ||
|
|
8eed5a70a5 | ||
|
|
758ec168bd | ||
|
|
63a94bae0e | ||
|
|
29fc611885 | ||
|
|
1f9131ff5a | ||
|
|
950857fa84 | ||
|
|
54f50aa09e | ||
|
|
a5945c9e59 | ||
|
|
c8b4f89335 | ||
|
|
809889f9f0 | ||
|
|
6595659a7a | ||
|
|
9872ce33bb | ||
|
|
2ff490d121 | ||
|
|
c76195c491 | ||
|
|
831a8cd5f7 | ||
|
|
f0f40cad4a | ||
|
|
f473567bd7 | ||
|
|
3e7037e06f | ||
|
|
c465153cc7 | ||
|
|
b120682d8e | ||
|
|
c9bb0d0ccb | ||
|
|
c94fa3cccf | ||
|
|
55af33e0e8 | ||
|
|
c0f07c2d4f | ||
|
|
7ca7bcc952 | ||
|
|
ee8c8a0c13 | ||
|
|
30ce3deb31 | ||
|
|
a6cf131cd3 | ||
|
|
25b13d7822 | ||
|
|
01500e78b6 | ||
|
|
4ecc98dd46 | ||
|
|
32f8d65bb8 | ||
|
|
d19b9a65b9 | ||
|
|
98e1d120cc | ||
|
|
26ff7a969c | ||
|
|
a8e198ad55 | ||
|
|
f1a626ddf5 | ||
|
|
ff616db4ad | ||
|
|
9880b48b78 | ||
|
|
23a336020c | ||
|
|
605db8a4d2 | ||
|
|
6ec55ba460 | ||
|
|
938f51ef8c | ||
|
|
6d620ba9c2 | ||
|
|
0c4c128465 | ||
|
|
97c1ae1c43 |
@@ -0,0 +1,47 @@
|
||||
name: Fixturenet-Eth-Plugeth-Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
paths:
|
||||
- '!**'
|
||||
- '.gitea/workflows/triggers/fixturenet-eth-plugeth-test'
|
||||
|
||||
# Needed until we can incorporate docker startup into the executor container
|
||||
env:
|
||||
DOCKER_HOST: unix:///var/run/dind.sock
|
||||
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: "Run an Ethereum plugeth fixturenet test"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
# At present the stock setup-python action fails on Linux/aarch64
|
||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
||||
- name: "Install Python for ARM on Linux"
|
||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
||||
uses: deadsnakes/action@v3.0.1
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Install Python cases other than ARM on Linux"
|
||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
run: python3 --version
|
||||
- name: "Install shiv"
|
||||
run: pip install shiv
|
||||
- name: "Generate build version file"
|
||||
run: ./scripts/create_build_tag_file.sh
|
||||
- name: "Build local shiv package"
|
||||
run: ./scripts/build_shiv_package.sh
|
||||
- name: Start dockerd # Also needed until we can incorporate into the executor
|
||||
run: |
|
||||
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
||||
sleep 5
|
||||
- name: "Run fixturenet-eth tests"
|
||||
run: ./tests/fixturenet-eth-plugeth/run-test.sh
|
||||
@@ -2,7 +2,15 @@ name: Fixturenet-Eth-Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: 'ci-test'
|
||||
branches: '*'
|
||||
paths:
|
||||
- '!**'
|
||||
- '.gitea/workflows/triggers/fixturenet-eth-test'
|
||||
|
||||
# Needed until we can incorporate docker startup into the executor container
|
||||
env:
|
||||
DOCKER_HOST: unix:///var/run/dind.sock
|
||||
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -11,8 +19,16 @@ jobs:
|
||||
steps:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: cerc-io/setup-python@v4
|
||||
# At present the stock setup-python action fails on Linux/aarch64
|
||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
||||
- name: "Install Python for ARM on Linux"
|
||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
||||
uses: deadsnakes/action@v3.0.1
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Install Python cases other than ARM on Linux"
|
||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
@@ -23,5 +39,10 @@ jobs:
|
||||
run: ./scripts/create_build_tag_file.sh
|
||||
- name: "Build local shiv package"
|
||||
run: ./scripts/build_shiv_package.sh
|
||||
- name: Start dockerd # Also needed until we can incorporate into the executor
|
||||
run: |
|
||||
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
||||
sleep 5
|
||||
- name: "Run fixturenet-eth tests"
|
||||
run: ./tests/fixturenet-eth/run-test.sh
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
name: Fixturenet-Laconicd-Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
paths:
|
||||
- '!**'
|
||||
- '.gitea/workflows/triggers/fixturenet-laconicd-test'
|
||||
|
||||
# Needed until we can incorporate docker startup into the executor container
|
||||
env:
|
||||
DOCKER_HOST: unix:///var/run/dind.sock
|
||||
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: "Run an Laconicd fixturenet test"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Update'
|
||||
run: apt-get update
|
||||
- name: 'Setup jq'
|
||||
run: apt-get install jq -y
|
||||
- name: 'Check jq'
|
||||
run: |
|
||||
which jq
|
||||
jq --version
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
# At present the stock setup-python action fails on Linux/aarch64
|
||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
||||
- name: "Install Python for ARM on Linux"
|
||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
||||
uses: deadsnakes/action@v3.0.1
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Install Python cases other than ARM on Linux"
|
||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
run: python3 --version
|
||||
- name: "Install shiv"
|
||||
run: pip install shiv
|
||||
- name: "Generate build version file"
|
||||
run: ./scripts/create_build_tag_file.sh
|
||||
- name: "Build local shiv package"
|
||||
run: ./scripts/build_shiv_package.sh
|
||||
- name: Start dockerd # Also needed until we can incorporate into the executor
|
||||
run: |
|
||||
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
||||
sleep 5
|
||||
- name: "Run fixturenet-laconicd tests"
|
||||
run: ./tests/fixturenet-laconicd/run-test.sh
|
||||
@@ -5,6 +5,8 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- publish-test
|
||||
paths-ignore:
|
||||
- '.gitea/workflows/triggers/*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
@@ -18,8 +20,16 @@ jobs:
|
||||
run: |
|
||||
build_tag=$(./scripts/create_build_tag_file.sh)
|
||||
echo "build-tag=v${build_tag}" >> $GITHUB_OUTPUT
|
||||
- name: "Install Python"
|
||||
uses: cerc-io/setup-python@v4
|
||||
# At present the stock setup-python action fails on Linux/aarch64
|
||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
||||
- name: "Install Python for ARM on Linux"
|
||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
||||
uses: deadsnakes/action@v3.0.1
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Install Python cases other than ARM on Linux"
|
||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
@@ -37,7 +47,7 @@ jobs:
|
||||
run: |
|
||||
cp ${{ steps.build.outputs.package-file }} ./laconic-so
|
||||
- name: "Create release"
|
||||
uses: cerc-io/action-gh-release@gitea-v1
|
||||
uses: https://gitea.com/cerc-io/action-gh-release@gitea-v2
|
||||
with:
|
||||
tag_name: ${{ steps.build-info.outputs.build-tag }}
|
||||
# On the publish test branch, mark our release as a draft
|
||||
|
||||
@@ -7,6 +7,8 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- ci-test
|
||||
paths-ignore:
|
||||
- '.gitea/workflows/triggers/*'
|
||||
|
||||
# Needed until we can incorporate docker startup into the executor container
|
||||
env:
|
||||
@@ -19,8 +21,16 @@ jobs:
|
||||
steps:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: cerc-io/setup-python@v4
|
||||
# At present the stock setup-python action fails on Linux/aarch64
|
||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
||||
- name: "Install Python for ARM on Linux"
|
||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
||||
uses: deadsnakes/action@v3.0.1
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Install Python cases other than ARM on Linux"
|
||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
|
||||
@@ -7,6 +7,8 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- ci-test
|
||||
paths-ignore:
|
||||
- '.gitea/workflows/triggers/*'
|
||||
|
||||
# Needed until we can incorporate docker startup into the executor container
|
||||
env:
|
||||
@@ -19,8 +21,16 @@ jobs:
|
||||
steps:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: cerc-io/setup-python@v4
|
||||
# At present the stock setup-python action fails on Linux/aarch64
|
||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
||||
- name: "Install Python for ARM on Linux"
|
||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
||||
uses: deadsnakes/action@v3.0.1
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Install Python cases other than ARM on Linux"
|
||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
@@ -37,3 +47,5 @@ jobs:
|
||||
sleep 5
|
||||
- name: "Run smoke tests"
|
||||
run: ./tests/smoke-test/run-smoke-test.sh
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Change this file to trigger running the fixturenet-eth-plugeth-test CI job
|
||||
trigger
|
||||
@@ -0,0 +1,2 @@
|
||||
Change this file to trigger running the fixturenet-eth-test CI job
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Change this file to trigger running the fixturenet-laconicd-test CI job
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
name: Fixturenet-Eth Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
paths:
|
||||
- '!**'
|
||||
- '.github/workflows/triggers/fixturenet-eth-test'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: "Run fixturenet-eth test suite"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
run: python3 --version
|
||||
- name: "Install shiv"
|
||||
run: pip install shiv
|
||||
- name: "Generate build version file"
|
||||
run: ./scripts/create_build_tag_file.sh
|
||||
- name: "Build local shiv package"
|
||||
run: ./scripts/build_shiv_package.sh
|
||||
- name: "Run fixturenet-eth tests"
|
||||
run: ./tests/fixturenet-eth/run-test.sh
|
||||
@@ -0,0 +1,30 @@
|
||||
name: Fixturenet-Laconicd Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
paths:
|
||||
- '!**'
|
||||
- '.github/workflows/triggers/fixturenet-laconicd-test'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: "Run fixturenet-laconicd test suite"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
run: python3 --version
|
||||
- name: "Install shiv"
|
||||
run: pip install shiv
|
||||
- name: "Generate build version file"
|
||||
run: ./scripts/create_build_tag_file.sh
|
||||
- name: "Build local shiv package"
|
||||
run: ./scripts/build_shiv_package.sh
|
||||
- name: "Run fixturenet-laconicd tests"
|
||||
run: ./tests/fixturenet-laconicd/run-test.sh
|
||||
@@ -0,0 +1,30 @@
|
||||
name: Fixturenet-Plugeth Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
paths:
|
||||
- '!**'
|
||||
- '.github/workflows/triggers/fixturenet-plugeth-test'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: "Run fixturenet-plugeth test suite"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
run: python3 --version
|
||||
- name: "Install shiv"
|
||||
run: pip install shiv
|
||||
- name: "Generate build version file"
|
||||
run: ./scripts/create_build_tag_file.sh
|
||||
- name: "Build local shiv package"
|
||||
run: ./scripts/build_shiv_package.sh
|
||||
- name: "Run fixturenet-plugeth tests"
|
||||
run: ./tests/fixturenet-plugeth/run-test.sh
|
||||
@@ -0,0 +1,21 @@
|
||||
name: Lint Checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: '*'
|
||||
push:
|
||||
branches: '*'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: "Run linter"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name : "Run flake8"
|
||||
uses: py-actions/flake8@v2
|
||||
@@ -0,0 +1,2 @@
|
||||
Change this file to trigger running the fixturenet-eth-test CI job
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Change this file to trigger running the fixturenet-laconicd-test CI job
|
||||
|
||||
trigger
|
||||
@@ -0,0 +1,3 @@
|
||||
Change this file to trigger running the fixturenet-plugeth-test CI job
|
||||
|
||||
trigger
|
||||
+1
-1
@@ -7,4 +7,4 @@ __pycache__
|
||||
*~
|
||||
package
|
||||
app/data/build_tag.txt
|
||||
build
|
||||
/build
|
||||
|
||||
@@ -6,7 +6,7 @@ Stack Orchestrator allows building and deployment of a Laconic Stack on a single
|
||||
|
||||
## Install
|
||||
|
||||
**To get started quickly** on a fresh Ubuntu instance (e.g, Digital Ocean); [try this script](./scripts/quick-install-ubuntu.sh). **WARNING:** always review scripts prior to running them so that you know what is happening on your machine.
|
||||
**To get started quickly** on a fresh Ubuntu instance (e.g, Digital Ocean); [try this script](./scripts/quick-install-linux.sh). **WARNING:** always review scripts prior to running them so that you know what is happening on your machine.
|
||||
|
||||
For any other installation, follow along below and **adapt these instructions based on the specifics of your system.**
|
||||
|
||||
@@ -16,6 +16,7 @@ Ensure that the following are already installed:
|
||||
- [Python3](https://wiki.python.org/moin/BeginnersGuide/Download): `python3 --version` >= `3.8.10` (the Python3 shipped in Ubuntu 20+ is good to go)
|
||||
- [Docker](https://docs.docker.com/get-docker/): `docker --version` >= `20.10.21`
|
||||
- [jq](https://stedolan.github.io/jq/download/): `jq --version` >= `1.5`
|
||||
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git): `git --version` >= `2.10.3`
|
||||
|
||||
Note: if installing docker-compose via package manager on Linux (as opposed to Docker Desktop), you must [install the plugin](https://docs.docker.com/compose/install/linux/#install-the-plugin-manually), e.g. :
|
||||
|
||||
@@ -48,6 +49,18 @@ Verify operation (your version will probably be different, just check here that
|
||||
laconic-so version
|
||||
Version: 1.1.0-7a607c2-202304260513
|
||||
```
|
||||
Save the distribution url to `~/.laconic-so/config.yml`:
|
||||
```bash
|
||||
mkdir ~/.laconic-so
|
||||
echo "distribution-url: https://github.com/cerc-io/stack-orchestrator/releases/latest/download/laconic-so" > ~/.laconic-so/config.yml
|
||||
```
|
||||
|
||||
### Update
|
||||
If Stack Orchestrator was installed using the process described above, it is able to subsequently self-update to the current latest version by running:
|
||||
|
||||
```bash
|
||||
laconic-so update
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
+14
-3
@@ -1,4 +1,4 @@
|
||||
# Copyright © 2022, 2023 Cerc
|
||||
# Copyright © 2022, 2023 Vulcanize
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
@@ -15,7 +15,8 @@
|
||||
|
||||
import os
|
||||
from abc import ABC, abstractmethod
|
||||
from .deploy_system import get_stack_status
|
||||
from app.deploy.deploy import get_stack_status
|
||||
from decouple import config
|
||||
|
||||
|
||||
def get_stack(config, stack):
|
||||
@@ -62,10 +63,20 @@ class package_registry_stack(base_stack):
|
||||
self.url = "http://gitea.local:3000/api/packages/cerc-io/npm/"
|
||||
else:
|
||||
# If not, print a message about how to start it and return fail to the caller
|
||||
print("ERROR: The package-registry stack is not running, and no external registry specified with CERC_NPM_REGISTRY_URL")
|
||||
print("ERROR: The package-registry stack is not running, and no external registry "
|
||||
"specified with CERC_NPM_REGISTRY_URL")
|
||||
print("ERROR: Start the local package registry with: laconic-so --stack package-registry deploy-system up")
|
||||
return False
|
||||
return True
|
||||
|
||||
def get_url(self):
|
||||
return self.url
|
||||
|
||||
|
||||
def get_npm_registry_url():
|
||||
# If an auth token is not defined, we assume the default should be the cerc registry
|
||||
# If an auth token is defined, we assume the local gitea should be used.
|
||||
default_npm_registry_url = "http://gitea.local:3000/api/packages/cerc-io/npm/" if config(
|
||||
"CERC_NPM_AUTH_TOKEN", default=None
|
||||
) else "https://git.vdb.to/api/packages/cerc-io/npm/"
|
||||
return config("CERC_NPM_REGISTRY_URL", default=default_npm_registry_url)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright © 2022, 2023 Cerc
|
||||
# Copyright © 2022, 2023 Vulcanize
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
@@ -27,7 +27,8 @@ import subprocess
|
||||
import click
|
||||
import importlib.resources
|
||||
from pathlib import Path
|
||||
from .util import include_exclude_check, get_parsed_stack_config
|
||||
from app.util import include_exclude_check, get_parsed_stack_config
|
||||
from app.base import get_npm_registry_url
|
||||
|
||||
# TODO: find a place for this
|
||||
# epilog="Config provided either in .env or settings.ini or env vars: CERC_REPO_BASE_DIR (defaults to ~/cerc)"
|
||||
@@ -51,7 +52,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||
continue_on_error = ctx.obj.continue_on_error
|
||||
|
||||
# See: https://stackoverflow.com/questions/25389095/python-get-path-of-root-project-structure
|
||||
container_build_dir = Path(__file__).absolute().parent.joinpath("data", "container-build")
|
||||
container_build_dir = Path(__file__).absolute().parent.parent.joinpath("data", "container-build")
|
||||
|
||||
if local_stack:
|
||||
dev_root_path = os.getcwd()[0:os.getcwd().rindex("stack-orchestrator")]
|
||||
@@ -66,7 +67,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||
print('Dev root directory doesn\'t exist, creating')
|
||||
|
||||
# See: https://stackoverflow.com/a/20885799/1701505
|
||||
from . import data
|
||||
from app import data
|
||||
with importlib.resources.open_text(data, "container-image-list.txt") as container_list_file:
|
||||
all_containers = container_list_file.read().splitlines()
|
||||
|
||||
@@ -84,7 +85,8 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||
|
||||
# TODO: make this configurable
|
||||
container_build_env = {
|
||||
"CERC_NPM_REGISTRY_URL": config("CERC_NPM_REGISTRY_URL", default="http://gitea.local:3000/api/packages/cerc-io/npm/"),
|
||||
"CERC_NPM_REGISTRY_URL": get_npm_registry_url(),
|
||||
"CERC_GO_AUTH_TOKEN": config("CERC_GO_AUTH_TOKEN", default=""),
|
||||
"CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default=""),
|
||||
"CERC_REPO_BASE_DIR": dev_root_path,
|
||||
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright © 2022, 2023 Cerc
|
||||
# Copyright © 2022, 2023 Vulcanize
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
@@ -25,15 +25,17 @@ from decouple import config
|
||||
import click
|
||||
import importlib.resources
|
||||
from python_on_whales import docker, DockerException
|
||||
from .base import get_stack
|
||||
from .util import include_exclude_check, get_parsed_stack_config
|
||||
from app.base import get_stack
|
||||
from app.util import include_exclude_check, get_parsed_stack_config
|
||||
|
||||
builder_js_image_name = "cerc/builder-js:local"
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option('--include', help="only build these packages")
|
||||
@click.option('--exclude', help="don\'t build these packages")
|
||||
@click.option("--force-rebuild", is_flag=True, default=False, help="Override existing target package version check -- force rebuild")
|
||||
@click.option("--force-rebuild", is_flag=True, default=False,
|
||||
help="Override existing target package version check -- force rebuild")
|
||||
@click.option("--extra-build-args", help="Supply extra arguments to build")
|
||||
@click.pass_context
|
||||
def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||
@@ -81,7 +83,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||
os.makedirs(build_root_path)
|
||||
|
||||
# See: https://stackoverflow.com/a/20885799/1701505
|
||||
from . import data
|
||||
from app import data
|
||||
with importlib.resources.open_text(data, "npm-package-list.txt") as package_list_file:
|
||||
all_packages = package_list_file.read().splitlines()
|
||||
|
||||
@@ -122,7 +124,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||
# envs = {"CERC_NPM_AUTH_TOKEN": npm_registry_url_token} | ({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
||||
# but that isn't available in Python 3.8 (default in Ubuntu 20) so for now we use dict.update:
|
||||
envs = {"CERC_NPM_AUTH_TOKEN": npm_registry_url_token,
|
||||
"LACONIC_HOSTED_CONFIG_FILE": "config-hosted.yml" # Convention used by our web app packages
|
||||
"LACONIC_HOSTED_CONFIG_FILE": "config-hosted.yml" # Convention used by our web app packages
|
||||
}
|
||||
envs.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
||||
envs.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {})
|
||||
@@ -0,0 +1,27 @@
|
||||
# Copyright © 2023 Vulcanize
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass
|
||||
class CommandOptions:
|
||||
stack: str
|
||||
quiet: bool = False
|
||||
verbose: bool = False
|
||||
dry_run: bool = False
|
||||
local_stack: bool = False
|
||||
debug: bool = False
|
||||
continue_on_error: bool = False
|
||||
@@ -0,0 +1,49 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
# Deploys the core (UniswapV3Factory) contract
|
||||
sushiswap-v3-core:
|
||||
image: cerc/sushiswap-v3-core:local
|
||||
restart: on-failure
|
||||
env_file:
|
||||
# Defaults
|
||||
- ../config/contract-sushiswap/deployment-params.env
|
||||
environment:
|
||||
# Overrides
|
||||
CERC_ETH_RPC_ENDPOINT: ${ETH_RPC_ENDPOINT}
|
||||
CERC_CHAIN_ID: ${CHAIN_ID}
|
||||
CERC_ACCOUNT_PRIVATE_KEY: ${ACCOUNT_PRIVATE_KEY}
|
||||
CERC_DEPLOY: ${DEPLOY}
|
||||
volumes:
|
||||
- ../config/network/wait-for-it.sh:/app/wait-for-it.sh
|
||||
- ../config/contract-sushiswap/deploy-core-contracts.sh:/app/deploy-core-contracts.sh
|
||||
- sushiswap_core_deployment:/app/deployments/docker
|
||||
command: ["bash", "-c", "/app/deploy-core-contracts.sh && tail -f"]
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
# Deploys the periphery (NFPM, token, etc.) contracts
|
||||
sushiswap-v3-periphery:
|
||||
image: cerc/sushiswap-v3-periphery:local
|
||||
restart: on-failure
|
||||
env_file:
|
||||
# Defaults
|
||||
- ../config/contract-sushiswap/deployment-params.env
|
||||
environment:
|
||||
# Overrides
|
||||
CERC_ETH_RPC_ENDPOINT: ${ETH_RPC_ENDPOINT}
|
||||
CERC_CHAIN_ID: ${CHAIN_ID}
|
||||
CERC_ACCOUNT_PRIVATE_KEY: ${ACCOUNT_PRIVATE_KEY}
|
||||
CERC_DEPLOY: ${DEPLOY}
|
||||
volumes:
|
||||
- ../config/network/wait-for-it.sh:/app/wait-for-it.sh
|
||||
- ../config/contract-sushiswap/deploy-periphery-contracts.sh:/app/deploy-periphery-contracts.sh
|
||||
- sushiswap_core_deployment:/app/core-deployments/docker
|
||||
- sushiswap_periphery_deployment:/app/deployments/docker
|
||||
command: ["bash", "-c", "/app/deploy-periphery-contracts.sh && tail -f"]
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
volumes:
|
||||
sushiswap_core_deployment:
|
||||
sushiswap_periphery_deployment:
|
||||
@@ -21,8 +21,8 @@ services:
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
environment:
|
||||
CERC_REMOTE_DEBUG: "true"
|
||||
CERC_RUN_STATEDIFF: "detect"
|
||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
||||
CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect}
|
||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
env_file:
|
||||
@@ -40,6 +40,7 @@ services:
|
||||
- fixturenet-eth-bootnode-geth
|
||||
ports:
|
||||
- "8545"
|
||||
- "8546"
|
||||
- "40000"
|
||||
- "6060"
|
||||
|
||||
@@ -61,6 +62,9 @@ services:
|
||||
- fixturenet-eth-bootnode-geth
|
||||
volumes:
|
||||
- fixturenet_eth_geth_2_data:/root/ethdata
|
||||
ports:
|
||||
- "8545"
|
||||
- "8546"
|
||||
|
||||
fixturenet-eth-bootnode-lighthouse:
|
||||
restart: always
|
||||
|
||||
@@ -3,6 +3,7 @@ services:
|
||||
restart: unless-stopped
|
||||
image: cerc/laconic-console-host:local
|
||||
environment:
|
||||
- CERC_WEBAPP_FILES_DIR=${CERC_WEBAPP_FILES_DIR:-/usr/local/share/.config/yarn/global/node_modules/@cerc-io/console-app/dist/production}
|
||||
- LACONIC_HOSTED_ENDPOINT=${LACONIC_HOSTED_ENDPOINT:-http://localhost}
|
||||
ports:
|
||||
- "80"
|
||||
|
||||
@@ -15,7 +15,7 @@ services:
|
||||
- "6060"
|
||||
- "26657"
|
||||
- "26656"
|
||||
- "9473:9473"
|
||||
- "9473"
|
||||
- "8545"
|
||||
- "8546"
|
||||
- "9090"
|
||||
@@ -25,3 +25,6 @@ services:
|
||||
image: cerc/laconic-registry-cli:local
|
||||
volumes:
|
||||
- ../config/fixturenet-laconicd/registry-cli-config-template.yml:/registry-cli-config-template.yml
|
||||
|
||||
volumes:
|
||||
laconicd-data:
|
||||
|
||||
@@ -8,17 +8,10 @@ services:
|
||||
image: cerc/lotus:local
|
||||
volumes:
|
||||
- ../config/fixturenet-lotus/setup-miner.sh:/docker-entrypoint-scripts.d/setup-miner.sh
|
||||
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||
- $HOME/stack-orchestrator/app/data/config/fixturenet-lotus/genesis/.genesis-sectors:/root/.genesis-sectors
|
||||
- lotus-shared:/root/.lotus-shared
|
||||
healthcheck:
|
||||
# test: ["CMD-SHELL", "grep 'started ChainNotify channel' /var/log/lotus.log"]
|
||||
# test: ["CMD-SHELL", "[ -f /root/.lotus-shared/miner.addr ]"]
|
||||
test: ["CMD-SHELL", "[ -d /root/.lotus-miner-local-net ]"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 60s
|
||||
- ../config/fixturenet-lotus/fund-account.sh:/fund-account.sh
|
||||
- lotus_miner_params:/var/tmp/filecoin-proof-parameters
|
||||
- lotus_shared:/root/.lotus-shared
|
||||
- lotus_miner_data:/root/data
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-miner.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
@@ -30,14 +23,23 @@ services:
|
||||
hostname: lotus-node-1
|
||||
env_file:
|
||||
- ../config/fixturenet-lotus/lotus-env.env
|
||||
environment:
|
||||
# Use 0.0.0.0 so that calls can be made from outside the container
|
||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
||||
image: cerc/lotus:local
|
||||
volumes:
|
||||
- ../config/fixturenet-lotus/setup-node.sh:/docker-entrypoint-scripts.d/setup-node.sh
|
||||
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||
- lotus-shared:/root/.lotus-shared
|
||||
- lotus_node_1_params:/var/tmp/filecoin-proof-parameters
|
||||
- lotus_shared:/root/.lotus-shared
|
||||
- lotus_node_1_data:/root/data
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "1234"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 60
|
||||
start_period: 3s
|
||||
depends_on:
|
||||
lotus-miner:
|
||||
condition: service_healthy
|
||||
- lotus-miner
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
@@ -49,14 +51,23 @@ services:
|
||||
hostname: lotus-node-2
|
||||
env_file:
|
||||
- ../config/fixturenet-lotus/lotus-env.env
|
||||
environment:
|
||||
# Use 0.0.0.0 so that calls can be made from outside the container
|
||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
||||
image: cerc/lotus:local
|
||||
volumes:
|
||||
- ../config/fixturenet-lotus/setup-node.sh:/docker-entrypoint-scripts.d/setup-node.sh
|
||||
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||
- lotus-shared:/root/.lotus-shared
|
||||
- lotus_node_2_params:/var/tmp/filecoin-proof-parameters
|
||||
- lotus_shared:/root/.lotus-shared
|
||||
- lotus_node_2_data:/root/data
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "1234"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 60
|
||||
start_period: 3s
|
||||
depends_on:
|
||||
lotus-miner:
|
||||
condition: service_healthy
|
||||
- lotus-miner
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
@@ -65,4 +76,10 @@ services:
|
||||
- "1777"
|
||||
|
||||
volumes:
|
||||
lotus-shared:
|
||||
lotus_miner_params:
|
||||
lotus_node_1_params:
|
||||
lotus_node_2_params:
|
||||
lotus_shared:
|
||||
lotus_miner_data:
|
||||
lotus_node_1_data:
|
||||
lotus_node_2_data:
|
||||
|
||||
@@ -23,10 +23,10 @@ services:
|
||||
command: |
|
||||
"./wait-for-it.sh -h ${CERC_L1_HOST:-$${DEFAULT_CERC_L1_HOST}} -p ${CERC_L1_PORT:-$${DEFAULT_CERC_L1_PORT}} -s -t 60 -- ./run.sh"
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh
|
||||
- ../container-build/cerc-optimism-contracts/hardhat-tasks/verify-contract-deployment.ts:/app/packages/contracts-bedrock/tasks/verify-contract-deployment.ts
|
||||
- ../container-build/cerc-optimism-contracts/hardhat-tasks/rekey-json.ts:/app/packages/contracts-bedrock/tasks/rekey-json.ts
|
||||
- ../container-build/cerc-optimism-contracts/hardhat-tasks/send-balance.ts:/app/packages/contracts-bedrock/tasks/send-balance.ts
|
||||
- ../config/network/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh
|
||||
- ../config/optimism-contracts/hardhat-tasks/verify-contract-deployment.ts:/app/packages/contracts-bedrock/tasks/verify-contract-deployment.ts
|
||||
- ../config/optimism-contracts/hardhat-tasks/rekey-json.ts:/app/packages/contracts-bedrock/tasks/rekey-json.ts
|
||||
- ../config/optimism-contracts/hardhat-tasks/send-balance.ts:/app/packages/contracts-bedrock/tasks/send-balance.ts
|
||||
- ../config/fixturenet-optimism/optimism-contracts/update-config.js:/app/packages/contracts-bedrock/update-config.js
|
||||
- ../config/fixturenet-optimism/optimism-contracts/run.sh:/app/packages/contracts-bedrock/run.sh
|
||||
- l2_accounts:/l2-accounts
|
||||
@@ -70,6 +70,7 @@ services:
|
||||
command: "/run-op-geth.sh"
|
||||
ports:
|
||||
- "0.0.0.0:8545:8545"
|
||||
- "0.0.0.0:8546:8546"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost:8545"]
|
||||
interval: 30s
|
||||
@@ -120,7 +121,7 @@ services:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_L1_RPC: ${CERC_L1_RPC}
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/wait-for-it.sh
|
||||
- ../config/network/wait-for-it.sh:/wait-for-it.sh
|
||||
- ../config/fixturenet-optimism/run-op-batcher.sh:/run-op-batcher.sh
|
||||
- l2_accounts:/l2-accounts:ro
|
||||
entrypoint: ["sh", "-c"]
|
||||
@@ -145,7 +146,7 @@ services:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_L1_RPC: ${CERC_L1_RPC}
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/wait-for-it.sh
|
||||
- ../config/network/wait-for-it.sh:/wait-for-it.sh
|
||||
- ../config/fixturenet-optimism/run-op-proposer.sh:/run-op-proposer.sh
|
||||
- l1_deployment:/contracts-bedrock:ro
|
||||
- l2_accounts:/l2-accounts:ro
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
services:
|
||||
fixturenet-eth-bootnode-geth:
|
||||
restart: always
|
||||
hostname: fixturenet-eth-bootnode-geth
|
||||
env_file:
|
||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||
environment:
|
||||
RUN_BOOTNODE: "true"
|
||||
image: cerc/fixturenet-plugeth-plugeth:local
|
||||
volumes:
|
||||
- fixturenet_plugeth_bootnode_geth_data:/root/ethdata
|
||||
ports:
|
||||
- "9898"
|
||||
- "30303"
|
||||
|
||||
fixturenet-eth-geth-1:
|
||||
restart: always
|
||||
hostname: fixturenet-eth-geth-1
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
environment:
|
||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
||||
CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect}
|
||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
env_file:
|
||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||
image: cerc/fixturenet-plugeth-plugeth:local
|
||||
volumes:
|
||||
- fixturenet_plugeth_geth_1_data:/root/ethdata
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8545/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
depends_on:
|
||||
- fixturenet-eth-bootnode-geth
|
||||
ports:
|
||||
- "8545"
|
||||
- "8546"
|
||||
- "40000"
|
||||
- "6060"
|
||||
|
||||
fixturenet-eth-geth-2:
|
||||
restart: always
|
||||
hostname: fixturenet-eth-geth-2
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8545/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
environment:
|
||||
CERC_KEEP_RUNNING_AFTER_GETH_EXIT: "true"
|
||||
env_file:
|
||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||
image: cerc/fixturenet-plugeth-plugeth:local
|
||||
depends_on:
|
||||
- fixturenet-eth-bootnode-geth
|
||||
volumes:
|
||||
- fixturenet_plugeth_geth_2_data:/root/ethdata
|
||||
ports:
|
||||
- "8545"
|
||||
- "8546"
|
||||
|
||||
fixturenet-eth-bootnode-lighthouse:
|
||||
restart: always
|
||||
hostname: fixturenet-eth-bootnode-lighthouse
|
||||
environment:
|
||||
RUN_BOOTNODE: "true"
|
||||
image: cerc/fixturenet-eth-lighthouse:local
|
||||
|
||||
fixturenet-eth-lighthouse-1:
|
||||
restart: always
|
||||
hostname: fixturenet-eth-lighthouse-1
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
env_file:
|
||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||
environment:
|
||||
NODE_NUMBER: "1"
|
||||
ETH1_ENDPOINT: "http://fixturenet-eth-geth-1:8545"
|
||||
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-1:8551"
|
||||
image: cerc/fixturenet-eth-lighthouse:local
|
||||
volumes:
|
||||
- fixturenet_plugeth_lighthouse_1_data:/opt/testnet/build/cl
|
||||
depends_on:
|
||||
fixturenet-eth-bootnode-lighthouse:
|
||||
condition: service_started
|
||||
fixturenet-eth-geth-1:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8001"
|
||||
|
||||
fixturenet-eth-lighthouse-2:
|
||||
restart: always
|
||||
hostname: fixturenet-eth-lighthouse-2
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
env_file:
|
||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||
environment:
|
||||
NODE_NUMBER: "2"
|
||||
ETH1_ENDPOINT: "http://fixturenet-eth-geth-2:8545"
|
||||
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-2:8551"
|
||||
LIGHTHOUSE_GENESIS_STATE_URL: "http://fixturenet-eth-lighthouse-1:8001/eth/v2/debug/beacon/states/0"
|
||||
image: cerc/fixturenet-eth-lighthouse:local
|
||||
volumes:
|
||||
- fixturenet_plugeth_lighthouse_2_data:/opt/testnet/build/cl
|
||||
depends_on:
|
||||
fixturenet-eth-bootnode-lighthouse:
|
||||
condition: service_started
|
||||
fixturenet-eth-geth-2:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
fixturenet_plugeth_bootnode_geth_data:
|
||||
fixturenet_plugeth_geth_1_data:
|
||||
fixturenet_plugeth_geth_2_data:
|
||||
fixturenet_plugeth_lighthouse_1_data:
|
||||
fixturenet_plugeth_lighthouse_2_data:
|
||||
@@ -0,0 +1,27 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
# Deploys the sushiswap v3 subgraph
|
||||
sushiswap-subgraph-v3:
|
||||
image: cerc/sushiswap-subgraphs:local
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
graph-node:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- APP=v3
|
||||
- NETWORK=lotus-fixturenet
|
||||
command: ["bash", "-c", "./v3/run-v3.sh && ./blocks/run-blocks.sh"]
|
||||
working_dir: /app/subgraphs
|
||||
volumes:
|
||||
- ../config/fixturenet-sushiswap-subgraph-v3/lotus-fixturenet.js.template:/app/config/lotus-fixturenet.js.template
|
||||
- ../config/fixturenet-sushiswap-subgraph-v3/run-blocks.sh:/app/subgraphs/blocks/run-blocks.sh
|
||||
- ../config/fixturenet-sushiswap-subgraph-v3/run-v3.sh:/app/subgraphs/v3/run-v3.sh
|
||||
- sushiswap_core_deployment:/app/subgraphs/v3/core-deployments/docker
|
||||
- sushiswap_periphery_deployment:/app/subgraphs/v3/periphery-deployments/docker
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
volumes:
|
||||
sushiswap_core_deployment:
|
||||
sushiswap_periphery_deployment:
|
||||
@@ -0,0 +1,42 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
go-nitro:
|
||||
image: cerc/go-nitro:local
|
||||
hostname: go-nitro
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
# Wait for Nitro contracts to be deployed
|
||||
nitro-contracts:
|
||||
condition: service_completed_successfully
|
||||
environment:
|
||||
CERC_NITRO_CHAIN_URL: ${CERC_NITRO_CHAIN_URL:-ws://fixturenet-eth-geth-1:8546}
|
||||
CERC_NITRO_PK: ${CERC_NITRO_PK:-f36f6dd450892224ee113899195ef922a4795d41c32cafb386d9aab6e0b7b0c6}
|
||||
CERC_NITRO_CHAIN_PK: ${CERC_NITRO_CHAIN_PK:-888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218}
|
||||
CERC_NITRO_USE_DURABLE_STORE: ${CERC_NITRO_USE_DURABLE_STORE:-true}
|
||||
CERC_NITRO_DURABLE_STORE_FOLDER: ${CERC_NITRO_DURABLE_STORE_FOLDER:-/app/data/nitro-store}
|
||||
CERC_NITRO_MSG_PORT: ${CERC_NITRO_MSG_PORT:-3006}
|
||||
CERC_NITRO_WS_MSG_PORT: ${CERC_NITRO_WS_MSG_PORT:-5006}
|
||||
CERC_NITRO_RPC_PORT: ${CERC_NITRO_RPC_PORT:-4006}
|
||||
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
|
||||
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}
|
||||
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}
|
||||
entrypoint: ["bash", "-c", "/app/run-nitro-node.sh"]
|
||||
volumes:
|
||||
- go_nitro_data:/app/data
|
||||
- nitro_deployment:/app/deployment
|
||||
- ../config/go-nitro/run-nitro-node.sh:/app/run-nitro-node.sh
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "4006"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
ports:
|
||||
- "3006:3006"
|
||||
- "4006:4006"
|
||||
- "5006:5006"
|
||||
|
||||
volumes:
|
||||
go_nitro_data:
|
||||
nitro_deployment:
|
||||
@@ -0,0 +1,71 @@
|
||||
services:
|
||||
graph-node:
|
||||
image: cerc/graph-node:local
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
ipfs:
|
||||
condition: service_healthy
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
environment:
|
||||
ipfs: ipfs:5001
|
||||
postgres_host: db
|
||||
postgres_port: 5432
|
||||
postgres_user: graph-node
|
||||
postgres_pass: password
|
||||
postgres_db: graph-node
|
||||
ethereum: ${ETH_NETWORKS:-lotus-fixturenet:http://lotus-node-1:1234/rpc/v1}
|
||||
GRAPH_LOG: debug
|
||||
ETHEREUM_REORG_THRESHOLD: 3
|
||||
entrypoint: ["bash", "-c"]
|
||||
# Wait for ETH RPC endpoint to be up when running with fixturenet-lotus
|
||||
command: |
|
||||
"wait_for ${ETH_RPC_HOST:-lotus-node-1}:${ETH_RPC_PORT:-1234} -t 1800 -- start"
|
||||
ports:
|
||||
- "8000"
|
||||
- "8001"
|
||||
- "8020"
|
||||
- "8030"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "8020"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
ipfs:
|
||||
image: ipfs/kubo:master-2023-02-20-714a968
|
||||
volumes:
|
||||
- ipfs-import:/import
|
||||
- ipfs-data:/data/ipfs
|
||||
ports:
|
||||
- "8080"
|
||||
- "4001"
|
||||
- "5001"
|
||||
db:
|
||||
image: postgres:14-alpine
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: "graph-node"
|
||||
POSTGRES_DB: "graph-node"
|
||||
POSTGRES_PASSWORD: "password"
|
||||
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
|
||||
command:
|
||||
[
|
||||
"postgres",
|
||||
"-cshared_preload_libraries=pg_stat_statements"
|
||||
]
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
ports:
|
||||
- "5432"
|
||||
|
||||
volumes:
|
||||
ipfs-import:
|
||||
ipfs-data:
|
||||
db-data:
|
||||
@@ -0,0 +1,111 @@
|
||||
version: "3.2"
|
||||
services:
|
||||
ipld-eth-server-1:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
ipld-eth-db:
|
||||
condition: service_healthy
|
||||
image: cerc/ipld-eth-server:local
|
||||
environment:
|
||||
SERVER_HTTP_PATH: 0.0.0.0:8081
|
||||
SERVER_GRAPHQL: "true"
|
||||
SERVER_GRAPHQLPATH: 0.0.0.0:8082
|
||||
VDB_COMMAND: "serve"
|
||||
ETH_CHAIN_CONFIG: "/tmp/chain.json"
|
||||
DATABASE_NAME: cerc_testing
|
||||
DATABASE_HOSTNAME: ipld-eth-db
|
||||
DATABASE_PORT: 5432
|
||||
DATABASE_USER: "vdbm"
|
||||
DATABASE_PASSWORD: "password"
|
||||
ETH_CHAIN_ID: 99
|
||||
ETH_FORWARD_ETH_CALLS: "false"
|
||||
ETH_FORWARD_GET_STORAGE_AT: "false"
|
||||
ETH_PROXY_ON_ERROR: "false"
|
||||
METRICS: "true"
|
||||
PROM_HTTP: "true"
|
||||
PROM_HTTP_ADDR: "0.0.0.0"
|
||||
PROM_HTTP_PORT: "8090"
|
||||
LOG_LEVEL: "debug"
|
||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
||||
NITRO_RUN_NODE_IN_PROCESS: ${CERC_NITRO_RUN_NODE_IN_PROCESS:-true}
|
||||
NITRO_PK: ${CERC_NITRO_PK:-2d999770f7b5d49b694080f987b82bbc9fc9ac2b4dcc10b0f8aba7d700f69c6d}
|
||||
NITRO_CHAIN_PK: ${CERC_NITRO_CHAIN_PK:-570b909da9669b2f35a0b1ac70b8358516d55ae1b5b3710e95e9a94395090597}
|
||||
NITRO_CHAIN_URL: ${CERC_NITRO_CHAIN_URL:-ws://fixturenet-eth-geth-1:8546}
|
||||
NITRO_USE_DURABLE_STORE: ${CERC_NITRO_USE_DURABLE_STORE:-true}
|
||||
NITRO_DURABLE_STORE_FOLDER: ${CERC_NITRO_DURABLE_STORE_FOLDER:-/app/nitro-data/nitro-store}
|
||||
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
|
||||
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}
|
||||
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}
|
||||
entrypoint: ["bash", "-c", "/app/entrypoint.sh"]
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ../config/ipld-eth-server/chain.json
|
||||
target: /tmp/chain.json
|
||||
- eth_server_nitro_data:/app/nitro-data
|
||||
- nitro_deployment:/app/deployment
|
||||
- ../config/ipld-eth-server/entrypoint.sh:/app/entrypoint.sh
|
||||
ports:
|
||||
- "8081"
|
||||
- "8082"
|
||||
- "8090"
|
||||
- "40000"
|
||||
- "3005:3005"
|
||||
- "4005:4005"
|
||||
- "5005:5005"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "8081"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
|
||||
ipld-eth-server-2:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
ipld-eth-db:
|
||||
condition: service_healthy
|
||||
image: cerc/ipld-eth-server:local
|
||||
environment:
|
||||
SERVER_HTTP_PATH: 0.0.0.0:8081
|
||||
SERVER_GRAPHQL: "true"
|
||||
SERVER_GRAPHQLPATH: 0.0.0.0:8082
|
||||
VDB_COMMAND: "serve"
|
||||
ETH_CHAIN_CONFIG: "/tmp/chain.json"
|
||||
DATABASE_NAME: cerc_testing
|
||||
DATABASE_HOSTNAME: ipld-eth-db
|
||||
DATABASE_PORT: 5432
|
||||
DATABASE_USER: "vdbm"
|
||||
DATABASE_PASSWORD: "password"
|
||||
ETH_CHAIN_ID: 99
|
||||
ETH_FORWARD_ETH_CALLS: "false"
|
||||
ETH_FORWARD_GET_STORAGE_AT: "false"
|
||||
ETH_PROXY_ON_ERROR: "false"
|
||||
METRICS: "true"
|
||||
PROM_HTTP: "true"
|
||||
PROM_HTTP_ADDR: "0.0.0.0"
|
||||
PROM_HTTP_PORT: "8090"
|
||||
LOG_LEVEL: "debug"
|
||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
||||
NITRO_RUN_NODE_IN_PROCESS: ${CERC_NITRO_RUN_NODE_IN_PROCESS:-false}
|
||||
NITRO_ENDPOINT: ${CERC_NITRO_ENDPOINT:-go-nitro:4006/api/v1}
|
||||
entrypoint: ["bash", "-c", "/app/entrypoint.sh"]
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ../config/ipld-eth-server/chain.json
|
||||
target: /tmp/chain.json
|
||||
- ../config/ipld-eth-server/entrypoint.sh:/app/entrypoint.sh
|
||||
ports:
|
||||
- "8081"
|
||||
- "8082"
|
||||
- "8090"
|
||||
- "40000"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "8081"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
|
||||
volumes:
|
||||
eth_server_nitro_data:
|
||||
nitro_deployment:
|
||||
@@ -7,11 +7,9 @@ services:
|
||||
condition: service_healthy
|
||||
image: cerc/ipld-eth-server:local
|
||||
environment:
|
||||
IPLD_SERVER_GRAPHQL: "true"
|
||||
IPLD_POSTGRAPHILEPATH: http://graphql:5000
|
||||
ETH_SERVER_HTTPPATH: 0.0.0.0:8081
|
||||
ETH_SERVER_GRAPHQL: "true"
|
||||
ETH_SERVER_GRAPHQLPATH: 0.0.0.0:8082
|
||||
SERVER_HTTP_PATH: 0.0.0.0:8081
|
||||
SERVER_GRAPHQL: "true"
|
||||
SERVER_GRAPHQLPATH: 0.0.0.0:8082
|
||||
VDB_COMMAND: "serve"
|
||||
ETH_CHAIN_CONFIG: "/tmp/chain.json"
|
||||
DATABASE_NAME: cerc_testing
|
||||
@@ -27,8 +25,8 @@ services:
|
||||
PROM_HTTP: "true"
|
||||
PROM_HTTP_ADDR: "0.0.0.0"
|
||||
PROM_HTTP_PORT: "8090"
|
||||
LOGRUS_LEVEL: "debug"
|
||||
CERC_REMOTE_DEBUG: "true"
|
||||
LOG_LEVEL: "debug"
|
||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ../config/ipld-eth-server/chain.json
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
version: "3.2"
|
||||
|
||||
services:
|
||||
laconic-dot-com:
|
||||
image: cerc/laconic-dot-com:local
|
||||
restart: always
|
||||
ports:
|
||||
- "3000"
|
||||
@@ -0,0 +1,8 @@
|
||||
version: "3.2"
|
||||
|
||||
services:
|
||||
lasso:
|
||||
image: cerc/lasso:local
|
||||
restart: always
|
||||
ports:
|
||||
- "0.0.0.0:3000:3000"
|
||||
@@ -0,0 +1,15 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
redis:
|
||||
hostname: mainnet-eth-api-proxy-redis
|
||||
image: redis:7-alpine
|
||||
command: redis-server --save "" --appendonly no --maxmemory-policy allkeys-lru --maxmemory 1G
|
||||
|
||||
eth-api-proxy:
|
||||
hostname: mainnet-eth-api-proxy
|
||||
image: cerc/eth-api-proxy:local
|
||||
env_file:
|
||||
- ../config/mainnet-eth-api-proxy/ethpxy.env
|
||||
ports:
|
||||
- 8547
|
||||
@@ -0,0 +1,29 @@
|
||||
version: "3.2"
|
||||
|
||||
services:
|
||||
migrations:
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
ipld-eth-db:
|
||||
condition: service_healthy
|
||||
image: cerc/ipld-eth-db:local
|
||||
env_file:
|
||||
- ../config/mainnet-eth-ipld-eth-db/db.env
|
||||
|
||||
ipld-eth-db:
|
||||
image: timescale/timescaledb:2.8.1-pg14
|
||||
restart: always
|
||||
env_file:
|
||||
- ../config/mainnet-eth-ipld-eth-db/db.env
|
||||
volumes:
|
||||
- mainnet_eth_ipld_eth_db:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
ports:
|
||||
- "5432"
|
||||
volumes:
|
||||
mainnet_eth_ipld_eth_db:
|
||||
@@ -0,0 +1,24 @@
|
||||
version: "3.7"
|
||||
services:
|
||||
ipld-eth-server:
|
||||
restart: always
|
||||
depends_on:
|
||||
ipld-eth-db:
|
||||
condition: service_healthy
|
||||
image: cerc/ipld-eth-server:local
|
||||
env_file:
|
||||
- ../config/mainnet-eth-ipld-eth-db/db.env
|
||||
- ../config/mainnet-eth-ipld-eth-server/srv.env
|
||||
volumes:
|
||||
- ../config/mainnet-eth-ipld-eth-server/config.toml:/app/config.toml:ro
|
||||
ports:
|
||||
- "8081"
|
||||
- "8082"
|
||||
- "8090"
|
||||
- "40001"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "8081"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
@@ -0,0 +1,51 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
keycloak-db:
|
||||
image: postgres:14-alpine
|
||||
env_file:
|
||||
- ../config/mainnet-eth-keycloak/keycloak.env
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "35432"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
volumes:
|
||||
- mainnet_eth_keycloak_db:/var/lib/postgresql/data
|
||||
ports:
|
||||
- 35432
|
||||
|
||||
keycloak:
|
||||
image: cerc/keycloak:local
|
||||
env_file:
|
||||
- ../config/mainnet-eth-keycloak/keycloak.env
|
||||
environment:
|
||||
JAVA_OPTS_APPEND: "-Dkeycloak.migration.action=import -Dkeycloak.migration.provider=dir -Dkeycloak.migration.dir=/import -Dkeycloak.migration.strategy=IGNORE_EXISTING"
|
||||
volumes:
|
||||
- ../config/mainnet-eth-keycloak/import:/import
|
||||
ports:
|
||||
- 8080
|
||||
command: ["start"]
|
||||
depends_on:
|
||||
keycloak-db:
|
||||
condition: service_healthy
|
||||
|
||||
keycloak-reg-ui:
|
||||
image: cerc/keycloak-reg-ui:local
|
||||
env_file:
|
||||
- ../config/mainnet-eth-keycloak/keycloak.env
|
||||
volumes:
|
||||
- ../config/mainnet-eth-keycloak/ui:/config
|
||||
ports:
|
||||
- 80
|
||||
|
||||
keycloak-reg-api:
|
||||
image: cerc/keycloak-reg-api:local
|
||||
env_file:
|
||||
- ../config/mainnet-eth-keycloak/keycloak.env
|
||||
ports:
|
||||
- 9292
|
||||
|
||||
volumes:
|
||||
mainnet_eth_keycloak_db:
|
||||
@@ -0,0 +1,25 @@
|
||||
version: "3.2"
|
||||
services:
|
||||
prometheus:
|
||||
restart: always
|
||||
image: prom/prometheus
|
||||
depends_on:
|
||||
mainnet-eth-geth-1:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- ../config/mainnet-eth-metrics/metrics.env
|
||||
volumes:
|
||||
- ../config/mainnet-eth-metrics/prometheus/etc:/etc/prometheus
|
||||
ports:
|
||||
- "9090"
|
||||
grafana:
|
||||
restart: always
|
||||
image: grafana/grafana
|
||||
env_file:
|
||||
- ../config/mainnet-eth-metrics/metrics.env
|
||||
volumes:
|
||||
- ../config/mainnet-eth-metrics/grafana/etc/provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ../config/mainnet-eth-metrics/grafana/etc/provisioning/datasources:/etc/grafana/provisioning/datasources
|
||||
- ../config/mainnet-eth-metrics/grafana/etc/dashboards:/etc/grafana/dashboards
|
||||
ports:
|
||||
- "3000"
|
||||
@@ -0,0 +1,72 @@
|
||||
|
||||
services:
|
||||
|
||||
mainnet-eth-geth-1:
|
||||
restart: always
|
||||
hostname: mainnet-eth-geth-1
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
image: cerc/plugeth-with-plugins:local
|
||||
entrypoint: /bin/sh
|
||||
command: -c "/opt/run-geth.sh"
|
||||
env_file:
|
||||
- ../config/mainnet-eth-ipld-eth-db/db.env
|
||||
- ../config/mainnet-eth-plugeth/geth.env
|
||||
volumes:
|
||||
- mainnet_eth_plugeth_geth_1_data:/data
|
||||
- mainnet_eth_plugeth_config_data:/etc/mainnet-eth
|
||||
- ../config/mainnet-eth-plugeth/scripts/run-geth.sh:/opt/run-geth.sh
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
ports:
|
||||
# http api
|
||||
- "8545"
|
||||
# ws api
|
||||
- "8546"
|
||||
# ws el
|
||||
- "8551"
|
||||
# p2p
|
||||
- "30303"
|
||||
- "30303/udp"
|
||||
# debugging
|
||||
- "40000"
|
||||
# metrics
|
||||
- "6060"
|
||||
|
||||
mainnet-eth-lighthouse-1:
|
||||
restart: always
|
||||
hostname: mainnet-eth-lighthouse-1
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:5052/eth/v2/beacon/blocks/head"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
environment:
|
||||
LIGHTHOUSE_EXECUTION_ENDPOINT: "http://mainnet-eth-geth-1:8551"
|
||||
env_file:
|
||||
- ../config/mainnet-eth-plugeth/lighthouse.env
|
||||
image: cerc/lighthouse:local
|
||||
entrypoint: /bin/sh
|
||||
command: -c "/opt/run-lighthouse.sh"
|
||||
volumes:
|
||||
- mainnet_eth_plugeth_lighthouse_1_data:/data
|
||||
- mainnet_eth_plugeth_config_data:/etc/mainnet-eth
|
||||
- ../config/mainnet-eth-plugeth/scripts/run-lighthouse.sh:/opt/run-lighthouse.sh
|
||||
ports:
|
||||
# api
|
||||
- "5052"
|
||||
# metrics
|
||||
- "5054"
|
||||
# p2p
|
||||
- "9000"
|
||||
- "9000/udp"
|
||||
|
||||
volumes:
|
||||
mainnet_eth_plugeth_config_data:
|
||||
mainnet_eth_plugeth_geth_1_data:
|
||||
mainnet_eth_plugeth_lighthouse_1_data:
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
services:
|
||||
|
||||
mainnet-eth-geth-1:
|
||||
restart: always
|
||||
hostname: mainnet-eth-geth-1
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
image: cerc/go-ethereum:local
|
||||
entrypoint: /bin/sh
|
||||
command: -c "/opt/run-geth.sh"
|
||||
env_file:
|
||||
- ../config/mainnet-eth/geth.env
|
||||
volumes:
|
||||
- mainnet_eth_geth_1_data:/data
|
||||
- mainnet_eth_config_data:/etc/mainnet-eth
|
||||
- ../config/mainnet-eth/scripts/run-geth.sh:/opt/run-geth.sh
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
ports:
|
||||
# http api
|
||||
- "8545"
|
||||
# ws api
|
||||
- "8546"
|
||||
# ws el
|
||||
- "8551"
|
||||
# p2p
|
||||
- "30303"
|
||||
- "30303/udp"
|
||||
# debugging
|
||||
- "40000"
|
||||
# metrics
|
||||
- "6060"
|
||||
|
||||
mainnet-eth-lighthouse-1:
|
||||
restart: always
|
||||
hostname: mainnet-eth-lighthouse-1
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:5052/eth/v2/beacon/blocks/head"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
environment:
|
||||
LIGHTHOUSE_EXECUTION_ENDPOINT: "http://mainnet-eth-geth-1:8551"
|
||||
env_file:
|
||||
- ../config/mainnet-eth/lighthouse.env
|
||||
image: cerc/lighthouse:local
|
||||
entrypoint: /bin/sh
|
||||
command: -c "/opt/run-lighthouse.sh"
|
||||
volumes:
|
||||
- mainnet_eth_lighthouse_1_data:/data
|
||||
- mainnet_eth_config_data:/etc/mainnet-eth
|
||||
- ../config/mainnet-eth/scripts/run-lighthouse.sh:/opt/run-lighthouse.sh
|
||||
ports:
|
||||
# api
|
||||
- "5052"
|
||||
# metrics
|
||||
- "5054"
|
||||
# p2p
|
||||
- "9000"
|
||||
- "9000/udp"
|
||||
|
||||
volumes:
|
||||
mainnet_eth_config_data:
|
||||
mainnet_eth_geth_1_data:
|
||||
mainnet_eth_lighthouse_1_data:
|
||||
@@ -0,0 +1,17 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
go-opera:
|
||||
restart: unless-stopped
|
||||
image: cerc/go-opera:local
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-node.sh"]
|
||||
volumes:
|
||||
- ../config/mainnet-go-opera/start-node.sh:/docker-entrypoint-scripts.d/start-node.sh
|
||||
# TODO: ports taken from dockerfile, determine which are needed
|
||||
ports:
|
||||
- "5050:5050" # p2p port, needed
|
||||
- "5050:5050/udp"
|
||||
- "18545:18545" # http rpc port
|
||||
- "18546:18546" # websockets rpc port
|
||||
#- "18547" # unknown
|
||||
#- "19090" # unknown
|
||||
@@ -0,0 +1,34 @@
|
||||
services:
|
||||
laconicd:
|
||||
restart: no
|
||||
image: cerc/laconicd:local
|
||||
command: ["/bin/sh", "-c", "/opt/run-laconicd.sh"]
|
||||
volumes:
|
||||
# The cosmos-sdk node's database directory:
|
||||
- laconicd-data:/root/.laconicd/data
|
||||
- laconicd-config:/root/.laconicd/config
|
||||
- laconicd-keyring:/root/.laconicd/keyring-test
|
||||
# TODO: look at folding these scripts into the container
|
||||
- ../config/mainnet-laconicd/scripts/run-laconicd.sh:/opt/run-laconicd.sh
|
||||
- ../config/mainnet-laconicd/scripts/export-mykey.sh:/docker-entrypoint-scripts.d/export-mykey.sh
|
||||
- ../config/mainnet-laconicd/scripts/export-myaddress.sh:/docker-entrypoint-scripts.d/export-myaddress.sh
|
||||
# TODO: determine which of the ports below is really needed
|
||||
ports:
|
||||
- "6060"
|
||||
- "26657"
|
||||
- "26656"
|
||||
- "9473"
|
||||
- "8545"
|
||||
- "8546"
|
||||
- "9090"
|
||||
- "9091"
|
||||
- "1317"
|
||||
cli:
|
||||
image: cerc/laconic-registry-cli:local
|
||||
volumes:
|
||||
- ../config/mainnet-laconicd/registry-cli-config-template.yml:/registry-cli-config-template.yml
|
||||
|
||||
volumes:
|
||||
laconicd-data:
|
||||
laconicd-config:
|
||||
laconicd-keyring:
|
||||
@@ -0,0 +1,45 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
# Builds and serves the MobyMask v3 react-app
|
||||
mobymask-v3-app:
|
||||
restart: unless-stopped
|
||||
image: cerc/mobymask-ui:local
|
||||
env_file:
|
||||
- ../config/watcher-mobymask-v3/mobymask-params.env
|
||||
environment:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_CHAIN_ID: ${CERC_CHAIN_ID}
|
||||
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
||||
CERC_GOSSIPSUB_DIRECT_PEERS: ${CERC_GOSSIPSUB_DIRECT_PEERS}
|
||||
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
|
||||
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}
|
||||
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}
|
||||
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
|
||||
CERC_PAYMENT_NITRO_ADDRESS: ${CERC_PAYMENT_NITRO_ADDRESS:-0xBBB676f9cFF8D242e9eaC39D063848807d3D1D94}
|
||||
CERC_SNAP_URL: ${CERC_SNAP_URL}
|
||||
working_dir: /app
|
||||
command: ["bash", "/scripts/mobymask-app-start.sh"]
|
||||
volumes:
|
||||
- ../config/watcher-mobymask-v3/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
||||
- peers_ids:/peers
|
||||
- mobymask_deployment:/server
|
||||
- nitro_deployment:/nitro
|
||||
ports:
|
||||
- "127.0.0.1:3004:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "80"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 10s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
volumes:
|
||||
peers_ids:
|
||||
mobymask_deployment:
|
||||
nitro_deployment:
|
||||
@@ -14,16 +14,19 @@ services:
|
||||
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
|
||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||
CERC_BUILD_DIR: "@cerc-io/mobymask-ui/build"
|
||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
||||
CERC_RELEASE: "v0.1.7"
|
||||
CERC_USE_NPM: true
|
||||
CERC_CONFIG_FILE: "src/config.json"
|
||||
working_dir: /scripts
|
||||
command: ["sh", "mobymask-app-start.sh"]
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
||||
- ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json
|
||||
- peers_ids:/peers
|
||||
- mobymask_deployment:/server
|
||||
ports:
|
||||
- "0.0.0.0:3002:80"
|
||||
- "127.0.0.1:3002:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "80"]
|
||||
interval: 20s
|
||||
@@ -46,16 +49,19 @@ services:
|
||||
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
|
||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||
CERC_BUILD_DIR: "@cerc-io/mobymask-ui-lxdao/build"
|
||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
||||
CERC_RELEASE: "v0.1.7-lxdao-0.1.1"
|
||||
CERC_USE_NPM: false
|
||||
CERC_CONFIG_FILE: "src/utils/config.json"
|
||||
working_dir: /scripts
|
||||
command: ["sh", "mobymask-app-start.sh"]
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
||||
- ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json
|
||||
- peers_ids:/peers
|
||||
- mobymask_deployment:/server
|
||||
ports:
|
||||
- "0.0.0.0:3004:80"
|
||||
- "127.0.0.1:3004:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "80"]
|
||||
interval: 20s
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
mobymask-snap:
|
||||
restart: unless-stopped
|
||||
image: cerc/mobymask-snap:local
|
||||
ports:
|
||||
- "127.0.0.1:8080:8080"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "8080"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
@@ -0,0 +1,23 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
# Optionally deploys the Nitro contracts
|
||||
nitro-contracts:
|
||||
image: cerc/nitro-contracts:local
|
||||
restart: on-failure
|
||||
environment:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_ETH_RPC_ENDPOINT: ${CERC_ETH_RPC_ENDPOINT:-http://fixturenet-eth-geth-1:8545}
|
||||
CERC_PRIVATE_KEY_DEPLOYER: ${CERC_PRIVATE_KEY_DEPLOYER:-0x888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218}
|
||||
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
|
||||
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}
|
||||
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}
|
||||
volumes:
|
||||
- ../config/nitro-contracts/deploy.sh:/app/deploy.sh
|
||||
- nitro_deployment:/app/deployment
|
||||
command: ["bash", "-c", "/app/deploy.sh"]
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
volumes:
|
||||
nitro_deployment:
|
||||
@@ -0,0 +1,7 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
nitro-rpc-client:
|
||||
image: cerc/nitro-rpc-client:local
|
||||
hostname: nitro-rpc-client
|
||||
restart: on-failure
|
||||
command: ["bash", "-c", "tail -f /dev/null"]
|
||||
@@ -1,8 +1,9 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
# Builds and serves the peer-test react-app
|
||||
peer-test-app:
|
||||
# Builds and serves the peer-test react-app
|
||||
restart: unless-stopped
|
||||
image: cerc/react-peer:local
|
||||
working_dir: /scripts
|
||||
env_file:
|
||||
@@ -13,11 +14,11 @@ services:
|
||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||
command: ["sh", "test-app-start.sh"]
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||
- ../config/network/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||
- ../config/watcher-mobymask-v2/test-app-start.sh:/scripts/test-app-start.sh
|
||||
- peers_ids:/peers
|
||||
ports:
|
||||
- "0.0.0.0:3003:80"
|
||||
- "127.0.0.1:3003:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "80"]
|
||||
interval: 20s
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
ponder-er20-contracts:
|
||||
image: cerc/watcher-erc20:local
|
||||
restart: on-failure
|
||||
environment:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_ETH_RPC_ENDPOINT: ${CERC_ETH_RPC_ENDPOINT:-http://fixturenet-eth-geth-1:8545}
|
||||
CERC_PRIVATE_KEY_DEPLOYER: ${CERC_PRIVATE_KEY_DEPLOYER:-0x888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218}
|
||||
volumes:
|
||||
- ../config/ponder/deploy-erc20-contract.sh:/app/deploy-erc20-contract.sh
|
||||
- erc20_deployment:/app/deployment
|
||||
command: ["bash", "-c", "/app/deploy-erc20-contract.sh"]
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
ponder-app-indexer-1:
|
||||
hostname: ponder-app-indexer-1
|
||||
restart: unless-stopped
|
||||
image: cerc/ponder:local
|
||||
working_dir: /app/examples/token-erc20
|
||||
environment:
|
||||
CERC_PONDER_CHAIN_ID: ${PONDER_CHAIN_ID:-99}
|
||||
CERC_PONDER_RPC_URL_1: ${PONDER_RPC_URL_1:-http://ipld-eth-server-2:8081}
|
||||
CERC_PONDER_NITRO_PK: ${CERC_PONDER_INDEXER_NITRO_PK_1:-58368d20ff12f17669c06158c21d885897aa56f9be430edc789614bf9851d53f}
|
||||
CERC_PONDER_NITRO_CHAIN_PK: ${CERC_PONDER_INDEXER_NITRO_CHAIN_PK_1:-fb1e9af328c283ca3e2486e7c24d13582b7912057d8b9542ff41503c85bc05c0}
|
||||
CERC_PONDER_NITRO_CHAIN_URL: ${CERC_PONDER_NITRO_CHAIN_URL:-http://fixturenet-eth-geth-1:8546}
|
||||
CERC_RELAY_MULTIADDR: ${CERC_RELAY_MULTIADDR}
|
||||
CERC_UPSTREAM_NITRO_ADDRESS: ${CERC_UPSTREAM_NITRO_ADDRESS:-0x660a4bEF3fbC863Fcd8D3CDB39242aE513d7D92e}
|
||||
CERC_UPSTREAM_NITRO_MULTIADDR: ${CERC_UPSTREAM_NITRO_MULTIADDR:-/dns4/go-nitro/tcp/5006/ws/p2p/16Uiu2HAmNUiX7bpCpbo5JdqEebp85ptGU2Vk2AT9E3BykvbwQ3F9}
|
||||
CERC_UPSTREAM_NITRO_PAY_AMOUNT: ${CERC_UPSTREAM_NITRO_PAY_AMOUNT:-100}
|
||||
command: ["bash", "./ponder-start.sh"]
|
||||
volumes:
|
||||
- ../config/ponder/ponder-start.sh:/app/examples/token-erc20/ponder-start.sh
|
||||
- ../config/ponder/ponder.indexer-1.config.ts:/app/examples/token-erc20/ponder.config.ts
|
||||
- ../config/ponder/base-rates-config.json:/app/examples/token-erc20/base-rates-config.json
|
||||
- peers_ids:/peers
|
||||
- nitro_deployment:/nitro
|
||||
- erc20_deployment:/erc20
|
||||
- ponder_indexer_1_nitro_data:/app/examples/token-erc20/.ponder/nitro-db
|
||||
ports:
|
||||
- "127.0.0.1:42070:42070"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
ponder-app-indexer-2:
|
||||
hostname: ponder-app-indexer-2
|
||||
restart: unless-stopped
|
||||
image: cerc/ponder:local
|
||||
working_dir: /app/examples/token-erc20
|
||||
environment:
|
||||
CERC_PONDER_CHAIN_ID: ${PONDER_CHAIN_ID:-99}
|
||||
CERC_INDEXER_GQL_ENDPOINT: ${CERC_INDEXER_GQL_ENDPOINT:-http://ponder-app-indexer-1:42070/graphql}
|
||||
CERC_PONDER_NITRO_PK: ${CERC_PONDER_INDEXER_NITRO_PK_2:-0aca28ba64679f63d71e671ab4dbb32aaa212d4789988e6ca47da47601c18fe2}
|
||||
CERC_PONDER_NITRO_CHAIN_PK: ${CERC_PONDER_INDEXER_NITRO_CHAIN_PK_2:-6177345b77c4069ac4d553f8b43cf68a799ca4bb63eac93d6cf796d63694ebf0}
|
||||
CERC_PONDER_NITRO_CHAIN_URL: ${CERC_PONDER_NITRO_CHAIN_URL:-http://fixturenet-eth-geth-1:8546}
|
||||
CERC_RELAY_MULTIADDR: ${CERC_RELAY_MULTIADDR}
|
||||
CERC_INDEXER_NITRO_ADDRESS: ${CERC_INDEXER_NITRO_ADDRESS:-0x67D5b55604d1aF90074FcB69b8C51838FFF84f8d}
|
||||
CERC_UPSTREAM_NITRO_PAY_AMOUNT: ${CERC_UPSTREAM_NITRO_PAY_AMOUNT:-100}
|
||||
command: ["bash", "./ponder-start.sh"]
|
||||
volumes:
|
||||
- ../config/ponder/ponder-start.sh:/app/examples/token-erc20/ponder-start.sh
|
||||
- ../config/ponder/ponder.indexer-2.config.ts:/app/examples/token-erc20/ponder.config.ts
|
||||
- ../config/ponder/base-rates-config.json:/app/examples/token-erc20/base-rates-config.json
|
||||
- peers_ids:/peers
|
||||
- nitro_deployment:/nitro
|
||||
- erc20_deployment:/erc20
|
||||
- ponder_indexer_2_nitro_data:/app/examples/token-erc20/.ponder/nitro-db
|
||||
ports:
|
||||
- "127.0.0.1:42071:42070"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
volumes:
|
||||
peers_ids:
|
||||
nitro_deployment:
|
||||
erc20_deployment:
|
||||
ponder_indexer_1_nitro_data:
|
||||
ponder_indexer_2_nitro_data:
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
ponder-app-watcher:
|
||||
hostname: ponder-app-watcher
|
||||
depends_on:
|
||||
- ponder-app-indexer-1
|
||||
restart: unless-stopped
|
||||
image: cerc/ponder:local
|
||||
working_dir: /app/examples/token-erc20
|
||||
environment:
|
||||
CERC_PONDER_CHAIN_ID: ${PONDER_CHAIN_ID:-99}
|
||||
CERC_PONDER_NITRO_PK: ${CERC_PONDER_WATCHER_NITRO_PK:-febb3b74b0b52d0976f6571d555f4ac8b91c308dfa25c7b58d1e6a7c3f50c781}
|
||||
CERC_PONDER_NITRO_CHAIN_PK: ${CERC_PONDER_WATCHER_NITRO_CHAIN_PK:-be4aa664815ea3bc3d63118649a733f6c96b243744310806ecb6d96359ab62cf}
|
||||
CERC_PONDER_NITRO_CHAIN_URL: ${CERC_PONDER_NITRO_CHAIN_URL:-http://fixturenet-eth-geth-1:8546}
|
||||
CERC_RELAY_MULTIADDR: ${CERC_RELAY_MULTIADDR}
|
||||
CERC_INDEXER_GQL_ENDPOINT: ${CERC_INDEXER_GQL_ENDPOINT:-http://ponder-app-indexer-2:42070/graphql}
|
||||
CERC_INDEXER_NITRO_ADDRESS: ${CERC_INDEXER_NITRO_ADDRESS:-0xB2B22ec3889d11f2ddb1A1Db11e80D20EF367c01}
|
||||
CERC_INDEXER_NITRO_PAY_AMOUNT: ${CERC_INDEXER_NITRO_PAY_AMOUNT:-50}
|
||||
command: ["bash", "./ponder-start.sh"]
|
||||
volumes:
|
||||
- ../config/ponder/ponder-start.sh:/app/examples/token-erc20/ponder-start.sh
|
||||
- ../config/ponder/ponder.watcher.config.ts:/app/examples/token-erc20/ponder.config.ts
|
||||
- ../config/ponder/base-rates-config.json:/app/examples/token-erc20/base-rates-config.json
|
||||
- peers_ids:/peers
|
||||
- nitro_deployment:/nitro
|
||||
- erc20_deployment:/erc20
|
||||
- ponder_watcher_nitro_data:/app/examples/token-erc20/.ponder/nitro-db
|
||||
ports:
|
||||
- "127.0.0.1:42069:42069"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
volumes:
|
||||
peers_ids:
|
||||
nitro_deployment:
|
||||
erc20_deployment:
|
||||
ponder_watcher_nitro_data:
|
||||
@@ -0,0 +1,35 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
reth:
|
||||
restart: unless-stopped
|
||||
hostname: reth
|
||||
image: cerc/reth:local
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-reth.sh"]
|
||||
volumes:
|
||||
- ../config/reth/start-reth.sh:/docker-entrypoint-scripts.d/start-reth.sh
|
||||
- reth_data:/root/.local/share/reth
|
||||
- shared_data:/root/.shared_data
|
||||
ports:
|
||||
- "8545:8545" # http rpc
|
||||
- "8546:8546" # ws rpc
|
||||
- "30303:30303" # network listening port
|
||||
- "30303:30303/udp"
|
||||
- "8551" # consensus auth
|
||||
|
||||
lighthouse:
|
||||
restart: unless-stopped
|
||||
hostname: lighthouse
|
||||
image: cerc/lighthouse:local
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-lighthouse.sh"]
|
||||
volumes:
|
||||
- ../config/reth/start-lighthouse.sh:/docker-entrypoint-scripts.d/start-lighthouse.sh
|
||||
- lighthouse_data:/root/.lighthouse/mainnet
|
||||
- shared_data:/root/.shared_data
|
||||
ports:
|
||||
- "8001"
|
||||
|
||||
volumes:
|
||||
reth_data:
|
||||
lighthouse_data:
|
||||
shared_data:
|
||||
@@ -0,0 +1,21 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
# Deploys the sushiswap v3 subgraph
|
||||
sushiswap-subgraph-v3:
|
||||
image: cerc/sushiswap-subgraphs:local
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
graph-node:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- APP=v3
|
||||
- NETWORK=filecoin
|
||||
command: ["bash", "-c", "./blocks/run-blocks.sh && ./v3/run-v3.sh"]
|
||||
working_dir: /app/subgraphs
|
||||
volumes:
|
||||
- ../config/sushiswap-subgraph-v3/filecoin.js:/app/config/filecoin.js
|
||||
- ../config/sushiswap-subgraph-v3/run-blocks.sh:/app/subgraphs/blocks/run-blocks.sh
|
||||
- ../config/sushiswap-subgraph-v3/run-v3.sh:/app/subgraphs/v3/run-v3.sh
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
@@ -4,8 +4,9 @@ services:
|
||||
restart: always
|
||||
environment:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_TEST_PARAM_1: ${CERC_TEST_PARAM_1:-FAILED}
|
||||
volumes:
|
||||
- test-data:/var
|
||||
- test-data:/data
|
||||
ports:
|
||||
- "80"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ services:
|
||||
- ETH_RPC_URL=http://go-ethereum:8545
|
||||
command: ["sh", "-c", "yarn server"]
|
||||
volumes:
|
||||
- ../config/watcher-erc20/erc20-watcher.toml:/app/packages/erc20-watcher/environments/local.toml
|
||||
- ../config/watcher-erc20/erc20-watcher.toml:/app/environments/local.toml
|
||||
ports:
|
||||
- "0.0.0.0:3002:3001"
|
||||
- "0.0.0.0:9002:9001"
|
||||
|
||||
@@ -14,7 +14,7 @@ services:
|
||||
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
|
||||
- mobymask_watcher_db_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "0.0.0.0:15432:5432"
|
||||
- "127.0.0.1:15432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||
interval: 20s
|
||||
@@ -44,7 +44,7 @@ services:
|
||||
CERC_L2_NODE_PORT: ${CERC_L2_NODE_PORT}
|
||||
command: ["sh", "deploy-and-generate-invite.sh"]
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/app/packages/server/wait-for-it.sh
|
||||
- ../config/network/wait-for-it.sh:/app/packages/server/wait-for-it.sh
|
||||
- ../config/watcher-mobymask-v2/secrets-template.json:/app/packages/server/secrets-template.json
|
||||
- ../config/watcher-mobymask-v2/deploy-and-generate-invite.sh:/app/packages/server/deploy-and-generate-invite.sh
|
||||
- mobymask_deployment:/app/packages/server
|
||||
@@ -84,6 +84,7 @@ services:
|
||||
CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER}
|
||||
CERC_RELAY_PEERS: ${CERC_RELAY_PEERS}
|
||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
||||
CERC_RELAY_ANNOUNCE_DOMAIN: ${CERC_RELAY_ANNOUNCE_DOMAIN}
|
||||
CERC_ENABLE_PEER_L2_TXS: ${CERC_ENABLE_PEER_L2_TXS}
|
||||
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
||||
@@ -95,9 +96,9 @@ services:
|
||||
- mobymask_deployment:/server
|
||||
# Expose GQL, metrics and relay node ports
|
||||
ports:
|
||||
- "0.0.0.0:3001:3001"
|
||||
- "0.0.0.0:9001:9001"
|
||||
- "0.0.0.0:9090:9090"
|
||||
- "127.0.0.1:3001:3001"
|
||||
- "127.0.0.1:9001:9001"
|
||||
- "127.0.0.1:9090:9090"
|
||||
healthcheck:
|
||||
test: ["CMD", "busybox", "nc", "localhost", "9090"]
|
||||
interval: 20s
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
# Starts the PostgreSQL database for watcher
|
||||
mobymask-watcher-db:
|
||||
restart: unless-stopped
|
||||
image: postgres:14-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=vdbm
|
||||
- POSTGRES_MULTIPLE_DATABASES=mobymask-watcher,mobymask-watcher-job-queue
|
||||
- POSTGRES_EXTENSION=mobymask-watcher-job-queue:pgcrypto
|
||||
- POSTGRES_PASSWORD=password
|
||||
volumes:
|
||||
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
|
||||
- mobymask_watcher_db_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "127.0.0.1:15432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 10s
|
||||
|
||||
# Deploys the MobyMask contract and generates an invite link
|
||||
# Deployment is skipped if CERC_DEPLOYED_CONTRACT env is set
|
||||
mobymask:
|
||||
image: cerc/mobymask:local
|
||||
working_dir: /app/packages/server
|
||||
env_file:
|
||||
- ../config/watcher-mobymask-v3/mobymask-params.env
|
||||
environment:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
ENV: "PROD"
|
||||
CERC_ETH_RPC_ENDPOINT: ${CERC_ETH_RPC_ENDPOINT}
|
||||
CERC_PRIVATE_KEY_DEPLOYER: ${CERC_PRIVATE_KEY_DEPLOYER:-0x888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218}
|
||||
CERC_MOBYMASK_APP_BASE_URI: ${CERC_MOBYMASK_APP_BASE_URI}
|
||||
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
||||
command: ["bash", "-c", "./deploy-and-generate-invite.sh"]
|
||||
volumes:
|
||||
- ../config/watcher-mobymask-v3/deploy-and-generate-invite.sh:/app/packages/server/deploy-and-generate-invite.sh
|
||||
- mobymask_deployment:/app/packages/server
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
# Creates peer-id files if they don't exist
|
||||
peer-ids-gen:
|
||||
image: cerc/watcher-ts:local
|
||||
restart: on-failure
|
||||
environment:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
working_dir: /app/packages/peer
|
||||
command: ["sh", "generate-peer-ids.sh"]
|
||||
volumes:
|
||||
- ../config/watcher-mobymask-v2/generate-peer-ids.sh:/app/packages/peer/generate-peer-ids.sh
|
||||
- peers_ids:/peer-ids
|
||||
|
||||
# Starts the MobyMask v3 watcher server
|
||||
mobymask-watcher-server:
|
||||
image: cerc/watcher-mobymask-v3:local
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
mobymask-watcher-db:
|
||||
condition: service_healthy
|
||||
peer-ids-gen:
|
||||
condition: service_completed_successfully
|
||||
mobymask:
|
||||
condition: service_completed_successfully
|
||||
nitro-contracts:
|
||||
condition: service_completed_successfully
|
||||
env_file:
|
||||
- ../config/watcher-mobymask-v3/mobymask-params.env
|
||||
environment:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_ETH_RPC_QUERY_ENDPOINT: ${CERC_ETH_RPC_QUERY_ENDPOINT}
|
||||
CERC_ETH_RPC_MUTATION_ENDPOINT: ${CERC_ETH_RPC_MUTATION_ENDPOINT}
|
||||
CERC_NITRO_CHAIN_URL: ${CERC_NITRO_CHAIN_URL}
|
||||
CERC_RELAY_PEERS: ${CERC_RELAY_PEERS}
|
||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
||||
CERC_RELAY_ANNOUNCE_DOMAIN: ${CERC_RELAY_ANNOUNCE_DOMAIN}
|
||||
CERC_ENABLE_PEER_L2_TXS: ${CERC_ENABLE_PEER_L2_TXS}
|
||||
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
||||
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
|
||||
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}
|
||||
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}
|
||||
CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER:-111b7500bdce494d6f4bcfe8c2a0dde2ef92f751d9070fac6475dbd6d8021b3f}
|
||||
CERC_WATCHER_NITRO_PK: ${CERC_WATCHER_NITRO_PK:-0279651921cd800ac560c21ceea27aab0107b67daf436cdd25ce84cad30159b4}
|
||||
CERC_PEER_ID: ${CERC_PEER_ID}
|
||||
CERC_ENABLE_UPSTREAM_PAYMENTS: ${CERC_ENABLE_UPSTREAM_PAYMENTS}
|
||||
CERC_UPSTREAM_NITRO_ADDRESS: ${CERC_UPSTREAM_NITRO_ADDRESS:-0xAAA6628Ec44A8a742987EF3A114dDFE2D4F7aDCE}
|
||||
CERC_UPSTREAM_NITRO_MULTIADDR: ${CERC_UPSTREAM_NITRO_MULTIADDR:-/dns4/ipld-eth-server-1/tcp/5005/ws/p2p/16Uiu2HAmSjXJqsyBJgcBUU2HQmykxGseafSatbpq5471XmuaUqyv}
|
||||
CERC_UPSTREAM_NITRO_PAY_AMOUNT: ${CERC_UPSTREAM_NITRO_PAY_AMOUNT:-100}
|
||||
command: ["bash", "./start-server.sh"]
|
||||
volumes:
|
||||
- ../config/watcher-mobymask-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml
|
||||
- ../config/watcher-mobymask-v3/watcher-config-rates.toml:/app/environments/rates.toml
|
||||
- ../config/watcher-mobymask-v3/keys:/app/keys
|
||||
- ../config/watcher-mobymask-v3/start-server.sh:/app/start-server.sh
|
||||
- watcher_nitro_data:/app/out/nitro-db
|
||||
- peers_ids:/app/peers
|
||||
- nitro_deployment:/nitro
|
||||
- mobymask_deployment:/server
|
||||
# Expose GQL, metrics and relay node ports
|
||||
ports:
|
||||
- "127.0.0.1:3001:3001"
|
||||
- "127.0.0.1:9001:9001"
|
||||
- "127.0.0.1:9090:9090"
|
||||
healthcheck:
|
||||
test: ["CMD", "busybox", "nc", "localhost", "9090"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
volumes:
|
||||
mobymask_watcher_db_data:
|
||||
peers_ids:
|
||||
mobymask_deployment:
|
||||
nitro_deployment:
|
||||
watcher_nitro_data:
|
||||
@@ -24,15 +24,37 @@ services:
|
||||
retries: 15
|
||||
start_period: 10s
|
||||
|
||||
mobymask-watcher-server:
|
||||
mobymask-watcher-job-runner:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
mobymask-watcher-db:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-mobymask:local
|
||||
command: ["sh", "-c", "yarn job-runner"]
|
||||
volumes:
|
||||
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/environments/local.toml
|
||||
ports:
|
||||
- "0.0.0.0:9000:9000"
|
||||
extra_hosts:
|
||||
- "ipld-eth-server:host-gateway"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "9000"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
|
||||
mobymask-watcher-server:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
mobymask-watcher-db:
|
||||
condition: service_healthy
|
||||
mobymask-watcher-job-runner:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-mobymask:local
|
||||
command: ["sh", "-c", "yarn server"]
|
||||
volumes:
|
||||
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/packages/mobymask-watcher/environments/local.toml
|
||||
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/environments/local.toml
|
||||
ports:
|
||||
- "0.0.0.0:3001:3001"
|
||||
- "0.0.0.0:9001:9001"
|
||||
@@ -45,21 +67,5 @@ services:
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
|
||||
mobymask-watcher-job-runner:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
mobymask-watcher-server:
|
||||
condition: service_healthy
|
||||
mobymask-watcher-db:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-mobymask:local
|
||||
command: ["sh", "-c", "yarn job-runner"]
|
||||
volumes:
|
||||
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/packages/mobymask-watcher/environments/local.toml
|
||||
ports:
|
||||
- "0.0.0.0:9000:9000"
|
||||
extra_hosts:
|
||||
- "ipld-eth-server:host-gateway"
|
||||
|
||||
volumes:
|
||||
mobymask_watcher_db_data:
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
sushiswap-watcher-db:
|
||||
restart: unless-stopped
|
||||
image: postgres:14-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=vdbm
|
||||
- POSTGRES_MULTIPLE_DATABASES=erc20-watcher,sushi-watcher,sushi-info-watcher,erc20-watcher-job-queue,sushi-watcher-job-queue,sushi-info-watcher-job-queue
|
||||
- POSTGRES_EXTENSION=erc20-watcher-job-queue:pgcrypto,sushi-watcher-job-queue:pgcrypto,sushi-info-watcher-job-queue:pgcrypto
|
||||
- POSTGRES_PASSWORD=password
|
||||
command: ["postgres", "-c", "shared_preload_libraries=pg_stat_statements", "-c", "pg_stat_statements.track=all", "-c", "work_mem=2GB"]
|
||||
volumes:
|
||||
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
|
||||
- ../config/postgresql/create-pg-stat-statements.sql:/docker-entrypoint-initdb.d/create-pg-stat-statements.sql
|
||||
- sushiswap_watcher_db_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "0.0.0.0:15435:5432"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 10s
|
||||
shm_size: '8GB'
|
||||
|
||||
erc20-watcher-server:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
sushiswap-watcher-db:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-sushiswap:local
|
||||
working_dir: /app/packages/erc20-watcher
|
||||
environment:
|
||||
- DEBUG=vulcanize:*
|
||||
command: ["node", "--enable-source-maps", "dist/server.js"]
|
||||
volumes:
|
||||
- ../config/watcher-sushiswap/erc20-watcher.toml:/app/packages/erc20-watcher/environments/local.toml
|
||||
ports:
|
||||
- "0.0.0.0:3005:3001"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "3001"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
sushi-watcher-job-runner:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
sushiswap-watcher-db:
|
||||
condition: service_healthy
|
||||
lotus-node-1:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-sushiswap:local
|
||||
working_dir: /app/packages/uni-watcher
|
||||
environment:
|
||||
- DEBUG=vulcanize:*
|
||||
command: ["node", "--enable-source-maps", "dist/job-runner.js"]
|
||||
volumes:
|
||||
- ../config/watcher-sushiswap/sushi-watcher.toml:/app/packages/uni-watcher/environments/local.toml
|
||||
- ../config/watcher-sushiswap/sushi-watcher-test.toml:/app/packages/uni-watcher/environments/test.toml
|
||||
ports:
|
||||
- "0.0.0.0:9004:9000"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "9000"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
sushi-watcher-server:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
sushiswap-watcher-db:
|
||||
condition: service_healthy
|
||||
sushi-watcher-job-runner:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-sushiswap:local
|
||||
env_file:
|
||||
- ../config/watcher-sushiswap/lotus-params.env
|
||||
environment:
|
||||
- DEBUG=vulcanize:*
|
||||
working_dir: /app/packages/uni-watcher
|
||||
command: ["node", "--enable-source-maps", "dist/server.js"]
|
||||
volumes:
|
||||
- ../config/watcher-sushiswap/sushi-watcher.toml:/app/packages/uni-watcher/environments/local.toml
|
||||
- ../config/watcher-sushiswap/sushi-watcher-test.toml:/app/packages/uni-watcher/environments/test.toml
|
||||
ports:
|
||||
- "0.0.0.0:3003:3003"
|
||||
- "0.0.0.0:9005:9001"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "3003"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
sushi-info-watcher-job-runner:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
sushiswap-watcher-db:
|
||||
condition: service_healthy
|
||||
erc20-watcher-server:
|
||||
condition: service_healthy
|
||||
lotus-node-1:
|
||||
condition: service_healthy
|
||||
sushi-watcher-server:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-sushiswap:local
|
||||
working_dir: /app/packages/uni-info-watcher
|
||||
environment:
|
||||
- DEBUG=vulcanize:*
|
||||
command: ["node", "--enable-source-maps", "dist/job-runner.js"]
|
||||
volumes:
|
||||
- ../config/watcher-sushiswap/sushi-info-watcher.toml:/app/packages/uni-info-watcher/environments/local.toml
|
||||
- ../config/watcher-sushiswap/sushi-info-watcher-test.toml:/app/packages/uni-info-watcher/environments/test.toml
|
||||
ports:
|
||||
- "0.0.0.0:9006:9002"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "9002"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
sushi-info-watcher-server:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
sushiswap-watcher-db:
|
||||
condition: service_healthy
|
||||
erc20-watcher-server:
|
||||
condition: service_healthy
|
||||
sushi-watcher-server:
|
||||
condition: service_healthy
|
||||
sushi-info-watcher-job-runner:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-sushiswap:local
|
||||
env_file:
|
||||
- ../config/watcher-sushiswap/lotus-params.env
|
||||
working_dir: /app/packages/uni-info-watcher
|
||||
command: ["node", "--enable-source-maps", "dist/server.js"]
|
||||
volumes:
|
||||
- ../config/watcher-sushiswap/sushi-info-watcher.toml:/app/packages/uni-info-watcher/environments/local.toml
|
||||
- ../config/watcher-sushiswap/sushi-info-watcher-test.toml:/app/packages/uni-info-watcher/environments/test.toml
|
||||
ports:
|
||||
- "0.0.0.0:3004:3004"
|
||||
- "0.0.0.0:9007:9003"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "3004"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
sushiswap-v3-info:
|
||||
depends_on:
|
||||
sushi-info-watcher-server:
|
||||
condition: service_healthy
|
||||
image: cerc/uniswap-v3-info:local
|
||||
ports:
|
||||
- "0.0.0.0:3006:3000"
|
||||
|
||||
# Deploys the core (UniswapV3Factory) contract
|
||||
sushiswap-v3-core:
|
||||
image: cerc/sushiswap-v3-core:local
|
||||
env_file:
|
||||
- ../config/watcher-sushiswap/lotus-params.env
|
||||
|
||||
# Deploys the periphery (NFPM, token, etc.) contracts
|
||||
sushiswap-v3-periphery:
|
||||
image: cerc/sushiswap-v3-periphery:local
|
||||
env_file:
|
||||
- ../config/watcher-sushiswap/lotus-params.env
|
||||
|
||||
volumes:
|
||||
sushiswap_watcher_db_data:
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Chain config
|
||||
export ETH_RPC_ENDPOINT="${CERC_ETH_RPC_ENDPOINT:-${CERC_DEFAULT_ETH_RPC_ENDPOINT}}"
|
||||
export CHAIN_ID="${CERC_CHAIN_ID:-${CERC_DEFAULT_CHAIN_ID}}"
|
||||
export ACCOUNT_PRIVATE_KEY="${CERC_ACCOUNT_PRIVATE_KEY:-${CERC_DEFAULT_ACCOUNT_PRIVATE_KEY}}"
|
||||
|
||||
# Option
|
||||
DEPLOY="${CERC_DEPLOY:-${CERC_DEFAULT_DEPLOY}}"
|
||||
|
||||
# Create a .env file
|
||||
echo "ETH_RPC_ENDPOINT=$ETH_RPC_ENDPOINT" > .env
|
||||
echo "CHAIN_ID=$CHAIN_ID" >> .env
|
||||
echo "ACCOUNT_PRIVATE_KEY=$ACCOUNT_PRIVATE_KEY" >> .env
|
||||
|
||||
echo "Using RPC endpoint ${ETH_RPC_ENDPOINT}"
|
||||
|
||||
# Wait for the RPC endpoint to be up
|
||||
endpoint=${ETH_RPC_ENDPOINT#http://}
|
||||
endpoint=${endpoint#https://}
|
||||
RPC_HOST=$(echo "$endpoint" | awk -F'[:/]' '{print $1}')
|
||||
RPC_PORT=$(echo "$endpoint" | awk -F'[:/]' '{print $2}')
|
||||
./wait-for-it.sh -h "${RPC_HOST}" -p "${RPC_PORT}" -s -t 0
|
||||
|
||||
if [ "$DEPLOY" = true ] && [ ! -e "/app/deployments/docker/UniswapV3Factory.json" ]; then
|
||||
echo "Performing core contract deployments..."
|
||||
pnpm hardhat --network docker deploy --tags UniswapV3Factory
|
||||
else
|
||||
echo "Skipping contract deployments"
|
||||
fi
|
||||
|
||||
echo "Done"
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Chain config
|
||||
ETH_RPC_ENDPOINT="${CERC_ETH_RPC_ENDPOINT:-${CERC_DEFAULT_ETH_RPC_ENDPOINT}}"
|
||||
CHAIN_ID="${CERC_CHAIN_ID:-${CERC_DEFAULT_CHAIN_ID}}"
|
||||
ACCOUNT_PRIVATE_KEY="${CERC_ACCOUNT_PRIVATE_KEY:-${CERC_DEFAULT_ACCOUNT_PRIVATE_KEY}}"
|
||||
|
||||
# Option
|
||||
DEPLOY="${CERC_DEPLOY:-${CERC_DEFAULT_DEPLOY}}"
|
||||
|
||||
# Create a .env file
|
||||
echo "ETH_RPC_ENDPOINT=$ETH_RPC_ENDPOINT" > .env
|
||||
echo "CHAIN_ID=$CHAIN_ID" >> .env
|
||||
echo "ACCOUNT_PRIVATE_KEY=$ACCOUNT_PRIVATE_KEY" >> .env
|
||||
|
||||
echo "Using RPC endpoint $ETH_RPC_ENDPOINT"
|
||||
|
||||
# Wait for the RPC endpoint to be up
|
||||
endpoint=${ETH_RPC_ENDPOINT#http://}
|
||||
endpoint=${endpoint#https://}
|
||||
RPC_HOST=$(echo "$endpoint" | awk -F'[:/]' '{print $1}')
|
||||
RPC_PORT=$(echo "$endpoint" | awk -F'[:/]' '{print $2}')
|
||||
./wait-for-it.sh -h "${RPC_HOST}" -p "${RPC_PORT}" -s -t 0
|
||||
|
||||
if [ "$DEPLOY" = true ] && [ ! -e "/app/deployments/docker/NonfungiblePositionManager.json" ]; then
|
||||
# Loop until the factory deployment is detected
|
||||
echo "Waiting for core deployments to occur"
|
||||
while [ ! -f /app/core-deployments/docker/UniswapV3Factory.json ]; do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Reading factory address from core deployments"
|
||||
FACTORY_ADDRESS=$(jq -r '.address' /app/core-deployments/docker/UniswapV3Factory.json)
|
||||
|
||||
echo "Using UniswapV3Factory at $FACTORY_ADDRESS"
|
||||
echo "FACTORY_ADDRESS=$FACTORY_ADDRESS" >> .env
|
||||
|
||||
echo "Performing periphery contract deployments..."
|
||||
yarn hardhat --network docker deploy --tags NonfungiblePositionManager
|
||||
else
|
||||
echo "Skipping contract deployments"
|
||||
fi
|
||||
|
||||
echo "Done"
|
||||
@@ -0,0 +1,11 @@
|
||||
# Chain config
|
||||
|
||||
CERC_DEFAULT_ETH_RPC_ENDPOINT="http://lotus-node-1:1234/rpc/v1"
|
||||
CERC_DEFAULT_CHAIN_ID=31415926
|
||||
|
||||
# From app/data/config/fixturenet-lotus/fund-account.sh
|
||||
CERC_DEFAULT_ACCOUNT_PRIVATE_KEY="0xc05fd3613bcd62a4f25e5eba1f464d0b76d74c3f771a7c2f13e26ad6439444b3"
|
||||
|
||||
# Options
|
||||
|
||||
CERC_DEFAULT_DEPLOY=true
|
||||
@@ -17,7 +17,9 @@ CERC_STATEDIFF_DB_PORT=5432
|
||||
CERC_STATEDIFF_DB_NAME="cerc_testing"
|
||||
CERC_STATEDIFF_DB_USER="vdbm"
|
||||
CERC_STATEDIFF_DB_PASSWORD="password"
|
||||
CERC_STATEDIFF_DB_GOOSE_MIN_VER=23
|
||||
CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
|
||||
CERC_STATEDIFF_DB_GOOSE_MIN_VER=${CERC_STATEDIFF_DB_GOOSE_MIN_VER:-18}
|
||||
CERC_STATEDIFF_DB_LOG_STATEMENTS="${CERC_STATEDIFF_DB_LOG_STATEMENTS:-false}"
|
||||
CERC_STATEDIFF_WORKERS=2
|
||||
|
||||
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"
|
||||
CERC_GETH_VERBOSITY=${CERC_GETH_VERBOSITY:-3}
|
||||
@@ -5,5 +5,5 @@ services:
|
||||
userKey: REPLACE_WITH_MYKEY
|
||||
bondId:
|
||||
chainId: laconic_9000-1
|
||||
gas: 250000
|
||||
gas: 350000
|
||||
fees: 200000aphoton
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ETH account with pk c05fd3613bcd62a4f25e5eba1f464d0b76d74c3f771a7c2f13e26ad6439444b3
|
||||
ETH_ADDRESS=0xD375B03bd3A2434A9f675bEC4Ccd68aC5e67C743
|
||||
AMOUNT=1000
|
||||
|
||||
# Pre-fund stat
|
||||
PREFUND_STAT_OUTPUT=$(lotus evm stat $ETH_ADDRESS)
|
||||
|
||||
FILECOIN_ADDRESS=$(echo "$PREFUND_STAT_OUTPUT" | grep -oP 'Filecoin address:\s+\K\S+')
|
||||
echo Filecoin address: "$FILECOIN_ADDRESS"
|
||||
|
||||
echo Sending balance to "$FILECOIN_ADDRESS"
|
||||
lotus send --from $(lotus wallet default) "$FILECOIN_ADDRESS" $AMOUNT
|
||||
|
||||
# Post-fund stat
|
||||
echo lotus evm stat $ETH_ADDRESS
|
||||
lotus evm stat $ETH_ADDRESS
|
||||
|
||||
echo "Account with ETH address $ETH_ADDRESS funded"
|
||||
-1
@@ -1 +0,0 @@
|
||||
}+V�{iνΆΠΉ�²�¨ΣΗ\k»qς␍—?δΪAΒfκ’~μ©™LΉ�tb·yqτ·²ηξΔ�Ο?ξaΣ�J
|
||||
-1
@@ -1 +0,0 @@
|
||||
Βfκ’~μ©™LΉ�tb·yqτ·²ηξΔ�Ο?ξaΣ�J
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1,71 +0,0 @@
|
||||
{
|
||||
"t01000": {
|
||||
"ID": "t01000",
|
||||
"Owner": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Worker": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"PeerId": "12D3KooWG5q6pWJVdPBhDBv9AjWVbUh4xxTAZ7xvgZSjczWuD2Z9",
|
||||
"MarketBalance": "0",
|
||||
"PowerBalance": "0",
|
||||
"SectorSize": 2048,
|
||||
"Sectors": [
|
||||
{
|
||||
"CommR": {
|
||||
"/": "bagboea4b5abcboxypcewlkmrat2myu4vthk3ii2pcomak7nhqmdbb6sxlolp2wdf"
|
||||
},
|
||||
"CommD": {
|
||||
"/": "baga6ea4seaqn3jfixthmdgksv4vhfeuyvr6upw6tvaqbmzmsyxnzosm4pwgnmlq"
|
||||
},
|
||||
"SectorID": 0,
|
||||
"Deal": {
|
||||
"PieceCID": {
|
||||
"/": "baga6ea4seaqn3jfixthmdgksv4vhfeuyvr6upw6tvaqbmzmsyxnzosm4pwgnmlq"
|
||||
},
|
||||
"PieceSize": 2048,
|
||||
"VerifiedDeal": false,
|
||||
"Client": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Provider": "t01000",
|
||||
"Label": "0",
|
||||
"StartEpoch": 0,
|
||||
"EndEpoch": 9001,
|
||||
"StoragePricePerEpoch": "0",
|
||||
"ProviderCollateral": "0",
|
||||
"ClientCollateral": "0"
|
||||
},
|
||||
"DealClientKey": {
|
||||
"Type": "bls",
|
||||
"PrivateKey": "tFvSRiSg2G3Ssgg0PSYy23XyjaIMXpsmdyG2B7UFLT4="
|
||||
},
|
||||
"ProofType": 5
|
||||
},
|
||||
{
|
||||
"CommR": {
|
||||
"/": "bagboea4b5abcb6krzypqcczhcnbeyjcqkeo6omfergm336o3kitugh3jgjog2yqq"
|
||||
},
|
||||
"CommD": {
|
||||
"/": "baga6ea4seaqhondpb2373hjasjplxvbjzi5n5mm4fbbhjxp5ptnbq4cibapkeii"
|
||||
},
|
||||
"SectorID": 1,
|
||||
"Deal": {
|
||||
"PieceCID": {
|
||||
"/": "baga6ea4seaqhondpb2373hjasjplxvbjzi5n5mm4fbbhjxp5ptnbq4cibapkeii"
|
||||
},
|
||||
"PieceSize": 2048,
|
||||
"VerifiedDeal": false,
|
||||
"Client": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Provider": "t01000",
|
||||
"Label": "1",
|
||||
"StartEpoch": 0,
|
||||
"EndEpoch": 9001,
|
||||
"StoragePricePerEpoch": "0",
|
||||
"ProviderCollateral": "0",
|
||||
"ClientCollateral": "0"
|
||||
},
|
||||
"DealClientKey": {
|
||||
"Type": "bls",
|
||||
"PrivateKey": "tFvSRiSg2G3Ssgg0PSYy23XyjaIMXpsmdyG2B7UFLT4="
|
||||
},
|
||||
"ProofType": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
7b2254797065223a22626c73222c22507269766174654b6579223a227446765352695367324733537367673050535979323358796a61494d5870736d64794732423755464c54343d227d
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ID": "f355523e-69d0-4984-bd0e-9588487c6231",
|
||||
"Weight": 0,
|
||||
"CanSeal": false,
|
||||
"CanStore": false,
|
||||
"MaxStorage": 0,
|
||||
"Groups": null,
|
||||
"AllowTo": null,
|
||||
"AllowTypes": null,
|
||||
"DenyTypes": null
|
||||
}
|
||||
Binary file not shown.
@@ -1,108 +0,0 @@
|
||||
{
|
||||
"NetworkVersion": 18,
|
||||
"Accounts": [
|
||||
{
|
||||
"Type": "account",
|
||||
"Balance": "50000000000000000000000000",
|
||||
"Meta": {
|
||||
"Owner": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Miners": [
|
||||
{
|
||||
"ID": "t01000",
|
||||
"Owner": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Worker": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"PeerId": "12D3KooWG5q6pWJVdPBhDBv9AjWVbUh4xxTAZ7xvgZSjczWuD2Z9",
|
||||
"MarketBalance": "0",
|
||||
"PowerBalance": "0",
|
||||
"SectorSize": 2048,
|
||||
"Sectors": [
|
||||
{
|
||||
"CommR": {
|
||||
"/": "bagboea4b5abcboxypcewlkmrat2myu4vthk3ii2pcomak7nhqmdbb6sxlolp2wdf"
|
||||
},
|
||||
"CommD": {
|
||||
"/": "baga6ea4seaqn3jfixthmdgksv4vhfeuyvr6upw6tvaqbmzmsyxnzosm4pwgnmlq"
|
||||
},
|
||||
"SectorID": 0,
|
||||
"Deal": {
|
||||
"PieceCID": {
|
||||
"/": "baga6ea4seaqn3jfixthmdgksv4vhfeuyvr6upw6tvaqbmzmsyxnzosm4pwgnmlq"
|
||||
},
|
||||
"PieceSize": 2048,
|
||||
"VerifiedDeal": false,
|
||||
"Client": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Provider": "t01000",
|
||||
"Label": "0",
|
||||
"StartEpoch": 0,
|
||||
"EndEpoch": 9001,
|
||||
"StoragePricePerEpoch": "0",
|
||||
"ProviderCollateral": "0",
|
||||
"ClientCollateral": "0"
|
||||
},
|
||||
"DealClientKey": {
|
||||
"Type": "bls",
|
||||
"PrivateKey": "tFvSRiSg2G3Ssgg0PSYy23XyjaIMXpsmdyG2B7UFLT4="
|
||||
},
|
||||
"ProofType": 5
|
||||
},
|
||||
{
|
||||
"CommR": {
|
||||
"/": "bagboea4b5abcb6krzypqcczhcnbeyjcqkeo6omfergm336o3kitugh3jgjog2yqq"
|
||||
},
|
||||
"CommD": {
|
||||
"/": "baga6ea4seaqhondpb2373hjasjplxvbjzi5n5mm4fbbhjxp5ptnbq4cibapkeii"
|
||||
},
|
||||
"SectorID": 1,
|
||||
"Deal": {
|
||||
"PieceCID": {
|
||||
"/": "baga6ea4seaqhondpb2373hjasjplxvbjzi5n5mm4fbbhjxp5ptnbq4cibapkeii"
|
||||
},
|
||||
"PieceSize": 2048,
|
||||
"VerifiedDeal": false,
|
||||
"Client": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Provider": "t01000",
|
||||
"Label": "1",
|
||||
"StartEpoch": 0,
|
||||
"EndEpoch": 9001,
|
||||
"StoragePricePerEpoch": "0",
|
||||
"ProviderCollateral": "0",
|
||||
"ClientCollateral": "0"
|
||||
},
|
||||
"DealClientKey": {
|
||||
"Type": "bls",
|
||||
"PrivateKey": "tFvSRiSg2G3Ssgg0PSYy23XyjaIMXpsmdyG2B7UFLT4="
|
||||
},
|
||||
"ProofType": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"NetworkName": "localnet-6d52dae5-ff29-4bac-a45d-f84e6c07564c",
|
||||
"VerifregRootKey": {
|
||||
"Type": "multisig",
|
||||
"Balance": "0",
|
||||
"Meta": {
|
||||
"Signers": [
|
||||
"t1ceb34gnsc6qk5dt6n7xg6ycwzasjhbxm3iylkiy"
|
||||
],
|
||||
"Threshold": 1,
|
||||
"VestingDuration": 0,
|
||||
"VestingStart": 0
|
||||
}
|
||||
},
|
||||
"RemainderAccount": {
|
||||
"Type": "multisig",
|
||||
"Balance": "0",
|
||||
"Meta": {
|
||||
"Signers": [
|
||||
"t1ceb34gnsc6qk5dt6n7xg6ycwzasjhbxm3iylkiy"
|
||||
],
|
||||
"Threshold": 1,
|
||||
"VestingDuration": 0,
|
||||
"VestingStart": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
LOTUS_PATH=~/.lotus-local-net
|
||||
LOTUS_MINER_PATH=~/.lotus-miner-local-net
|
||||
LOTUS_PATH=/root/data/.lotus-local-net
|
||||
LOTUS_MINER_PATH=/root/data/.lotus-miner-local-net
|
||||
LOTUS_SKIP_GENESIS_CHECK=_yes_
|
||||
LOTUS_FEVM_ENABLEETHRPC=true
|
||||
CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__"
|
||||
CGO_CFLAGS="-D__BLST_PORTABLE__"
|
||||
|
||||
@@ -2,37 +2,51 @@
|
||||
|
||||
lotus --version
|
||||
|
||||
# # remove old bootnode peer info if present
|
||||
# [ -f /root/.lotus-shared/miner.addr ] && rm /root/.lotus-shared/miner.addr
|
||||
# remove old bootnode peer info if present
|
||||
if [ -f /root/.lotus-shared/miner.addr ]; then
|
||||
rm /root/.lotus-shared/miner.addr
|
||||
fi
|
||||
|
||||
##TODO: generate genesis files inside container instead of bundling in config dir
|
||||
##something like commands below should work, other scripts/compose will have to be updated to corresponding directories
|
||||
# lotus fetch-params 2048
|
||||
# lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
|
||||
# lotus-seed genesis new localnet.json
|
||||
# lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json
|
||||
# Check if filecoin-proof-parameters exist; avoid fetching if they do
|
||||
if [ -z "$(find "/var/tmp/filecoin-proof-parameters" -maxdepth 1 -type f)" ]; then
|
||||
echo "Proof params not found, fetching..."
|
||||
lotus fetch-params 2048
|
||||
else
|
||||
echo "Existing proof params found"
|
||||
fi
|
||||
|
||||
# if genesis is not already setup
|
||||
if [ ! -f /root/data/localnet.json ]; then
|
||||
lotus-seed --sector-dir /root/data/.genesis-sectors pre-seal --sector-size 2KiB --num-sectors 2
|
||||
lotus-seed --sector-dir /root/data/.genesis-sectors genesis new /root/data/localnet.json
|
||||
lotus-seed --sector-dir /root/data/.genesis-sectors genesis add-miner /root/data/localnet.json /root/data/.genesis-sectors/pre-seal-t01000.json
|
||||
fi
|
||||
|
||||
# start daemon
|
||||
nohup lotus daemon --genesis=/devgen.car --profile=bootstrapper --bootstrap=false > /var/log/lotus.log 2>&1 &
|
||||
nohup lotus daemon --lotus-make-genesis=/root/.lotus-shared/devgen.car --profile=bootstrapper --genesis-template=/root/data/localnet.json --bootstrap=false > /var/log/lotus.log 2>&1 &
|
||||
|
||||
# Loop until the daemon is started
|
||||
echo "Waiting for daemon to start..."
|
||||
while ! grep -q "started ChainNotify channel" /var/log/lotus.log ; do
|
||||
sleep 5
|
||||
sleep 5
|
||||
done
|
||||
echo "Daemon started."
|
||||
|
||||
# publish bootnode peer info to shared volume
|
||||
lotus net listen | awk 'NR==1{print}' > /root/.lotus-shared/miner.addr
|
||||
|
||||
# if miner not already initialized
|
||||
if [ ! -d /root/.lotus-miner-local-net ]; then
|
||||
if [ ! -d $LOTUS_MINER_PATH ]; then
|
||||
# initialize miner
|
||||
lotus wallet import --as-default ~/.genesis-sectors/pre-seal-t01000.key
|
||||
lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync
|
||||
lotus wallet import --as-default /root/data/.genesis-sectors/pre-seal-t01000.key
|
||||
|
||||
# fund a known account for usage
|
||||
/fund-account.sh
|
||||
|
||||
echo "Initializing miner..."
|
||||
lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=/root/data/.genesis-sectors --pre-sealed-metadata=/root/data/.genesis-sectors/pre-seal-t01000.json --nosync
|
||||
fi
|
||||
|
||||
# publish bootnode peer info to shared volume
|
||||
lotus net listen | grep "$(ip addr | grep inet | grep -v '127.0.0.1' | sort | head -1 | awk '{print $2}' | cut -d '/' -f1)" | head -1 > /root/.lotus-shared/miner.addr
|
||||
|
||||
# start miner
|
||||
nohup lotus-miner run --nosync &
|
||||
|
||||
|
||||
@@ -2,23 +2,25 @@
|
||||
|
||||
lotus --version
|
||||
|
||||
##TODO: paths can use values from lotus-env.env file
|
||||
# Loop until the daemon is started
|
||||
echo "Waiting for miner to share peering info..."
|
||||
while [ ! -f /root/.lotus-shared/miner.addr ]; do
|
||||
sleep 5
|
||||
done
|
||||
echo "Resuming..."
|
||||
|
||||
# if not already initialized
|
||||
if [ ! -f /root/.lotus-local-net/config.toml ]; then
|
||||
# init node config
|
||||
mkdir $HOME/.lotus-local-net
|
||||
lotus config default > $HOME/.lotus-local-net/config.toml
|
||||
# init node config
|
||||
mkdir -p $LOTUS_PATH
|
||||
lotus config default > $LOTUS_PATH/config.toml
|
||||
|
||||
# add bootstrap peer info if available
|
||||
if [ -f /root/.lotus-shared/miner.addr ]; then
|
||||
MINER_ADDR=\"$(cat /root/.lotus-shared/miner.addr)\"
|
||||
# add bootstrap peer id to config file
|
||||
sed -i "/^\[Libp2p\]/a \ \ BootstrapPeers = [$MINER_ADDR]" $HOME/.lotus-local-net/config.toml
|
||||
else
|
||||
echo "Bootstrap peer info not found, unable to configure. Manual peering will be required."
|
||||
fi
|
||||
# add bootstrap peer info if available
|
||||
if [ -f /root/.lotus-shared/miner.addr ]; then
|
||||
MINER_ADDR=\"$(cat /root/.lotus-shared/miner.addr)\"
|
||||
# add bootstrap peer id to config file
|
||||
sed -i "/^\[Libp2p\]/a \ \ BootstrapPeers = [$MINER_ADDR]" $LOTUS_PATH/config.toml
|
||||
else
|
||||
echo "Bootstrap peer info not found, unable to configure. Manual peering will be required."
|
||||
fi
|
||||
|
||||
# start node
|
||||
lotus daemon --genesis=/devgen.car
|
||||
lotus daemon --genesis=/root/.lotus-shared/devgen.car
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
module.exports = {
|
||||
network: 'lotus-fixturenet',
|
||||
blocks: {
|
||||
address: '0x0000000000000000000000000000000000000000',
|
||||
startBlock: 0,
|
||||
},
|
||||
v3: {
|
||||
factory: {
|
||||
address: 'FACTORY_ADDRESS',
|
||||
startBlock: FACTORY_BLOCK
|
||||
},
|
||||
positionManager: {
|
||||
address: 'NFPM_ADDRESS',
|
||||
startBlock: NFPM_BLOCK
|
||||
},
|
||||
native: { address: 'NATIVE_ADDRESS' },
|
||||
whitelistedTokenAddresses: [
|
||||
'NATIVE_ADDRESS',
|
||||
],
|
||||
stableTokenAddresses: [],
|
||||
nativePricePool: '0x0000000000000000000000000000000000000000',
|
||||
minimumEthLocked: 1.5
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "Building blocks subgraph and deploying to graph-node..."
|
||||
|
||||
cd blocks
|
||||
|
||||
pnpm run generate
|
||||
pnpm run build
|
||||
|
||||
pnpm exec graph create --node http://graph-node:8020/ sushiswap/blocks
|
||||
pnpm exec graph deploy --node http://graph-node:8020/ --ipfs http://ipfs:5001 --version-label 0.1.0 sushiswap/blocks
|
||||
|
||||
echo "Done"
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
cd v3
|
||||
|
||||
# Loop until the NFPM deployment is detected
|
||||
echo "Waiting for sushiswap-periphery deployments to occur"
|
||||
while [ ! -f ./periphery-deployments/docker/NonfungiblePositionManager.json ]; do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Reading contract addresses and block numbers from deployments"
|
||||
FACTORY_ADDRESS=$(jq -r '.address' ./core-deployments/docker/UniswapV3Factory.json)
|
||||
FACTORY_BLOCK=$(jq -r '.receipt.blockNumber' ./core-deployments/docker/UniswapV3Factory.json)
|
||||
NATIVE_ADDRESS=$(jq -r '.address' ./periphery-deployments/docker/WFIL.json)
|
||||
NFPM_ADDRESS=$(jq -r '.address' ./periphery-deployments/docker/NonfungiblePositionManager.json)
|
||||
NFPM_BLOCK=$(jq -r '.receipt.blockNumber' ./periphery-deployments/docker/NonfungiblePositionManager.json)
|
||||
|
||||
# Read the JavaScript file content
|
||||
file_content=$(</app/config/lotus-fixturenet.js.template)
|
||||
|
||||
# Replace uppercase words with environment variables
|
||||
echo "Reading values in lotus-fixturenet config"
|
||||
replaced_content=$(echo "$file_content" | sed -e "s/FACTORY_ADDRESS/$FACTORY_ADDRESS/g" \
|
||||
-e "s/FACTORY_BLOCK/$FACTORY_BLOCK/g" \
|
||||
-e "s/NFPM_ADDRESS/$NFPM_ADDRESS/g" \
|
||||
-e "s/NFPM_BLOCK/$NFPM_BLOCK/g" \
|
||||
-e "s/NATIVE_ADDRESS/$NATIVE_ADDRESS/g")
|
||||
|
||||
# Write the replaced content back to the JavaScript file
|
||||
echo "$replaced_content" > /app/config/lotus-fixturenet.js
|
||||
|
||||
echo "Building v3 subgraph and deploying to graph-node..."
|
||||
|
||||
pnpm run generate
|
||||
pnpm run build
|
||||
|
||||
pnpm exec graph create --node http://graph-node:8020/ sushiswap/v3-lotus
|
||||
pnpm exec graph deploy --node http://graph-node:8020/ --ipfs http://ipfs:5001 --version-label 0.1.0 sushiswap/v3-lotus
|
||||
|
||||
echo "Done"
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
nitro_addresses_file="/app/deployment/nitro-addresses.json"
|
||||
|
||||
# Check if CERC_NA_ADDRESS environment variable is set
|
||||
if [ -n "$CERC_NA_ADDRESS" ]; then
|
||||
echo "CERC_NA_ADDRESS is set to '$CERC_NA_ADDRESS'"
|
||||
echo "CERC_VPA_ADDRESS is set to '$CERC_VPA_ADDRESS'"
|
||||
echo "CERC_CA_ADDRESS is set to '$CERC_CA_ADDRESS'"
|
||||
echo "Using the above Nitro addresses"
|
||||
|
||||
NA_ADDRESS=${CERC_NA_ADDRESS}
|
||||
VPA_ADDRESS=${CERC_VPA_ADDRESS}
|
||||
CA_ADDRESS=${CERC_CA_ADDRESS}
|
||||
elif [ -f ${nitro_addresses_file} ]; then
|
||||
echo "Reading Nitro addresses from ${nitro_addresses_file}"
|
||||
|
||||
NA_ADDRESS=$(jq -r '.nitroAdjudicatorAddress' ${nitro_addresses_file})
|
||||
VPA_ADDRESS=$(jq -r '.virtualPaymentAppAddress' ${nitro_addresses_file})
|
||||
CA_ADDRESS=$(jq -r '.consensusAppAddress' ${nitro_addresses_file})
|
||||
else
|
||||
echo "File ${nitro_addresses_file} not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Running Nitro node"
|
||||
|
||||
# Assuming CERC_NITRO_CHAIN_URL is of format <ws|http>://host:port
|
||||
ws_host=$(echo "$CERC_NITRO_CHAIN_URL" | awk -F '://' '{print $2}' | cut -d ':' -f 1)
|
||||
ws_port=$(echo "$CERC_NITRO_CHAIN_URL" | awk -F '://' '{print $2}' | cut -d ':' -f 2)
|
||||
|
||||
# Wait till chain endpoint is available
|
||||
retry_interval=5
|
||||
while true; do
|
||||
nc -z -w 1 "$ws_host" "$ws_port"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Chain endpoint is available"
|
||||
break
|
||||
fi
|
||||
|
||||
echo "Chain endpoint not yet available, retrying in $retry_interval seconds..."
|
||||
sleep $retry_interval
|
||||
done
|
||||
|
||||
./nitro -chainurl ${CERC_NITRO_CHAIN_URL} -msgport ${CERC_NITRO_MSG_PORT} -rpcport ${CERC_NITRO_RPC_PORT} -wsmsgport ${CERC_NITRO_WS_MSG_PORT} -publicip "0.0.0.0" -pk ${CERC_NITRO_PK} -chainpk ${CERC_NITRO_CHAIN_PK} -naaddress ${NA_ADDRESS} -vpaaddress ${VPA_ADDRESS} -caaddress ${CA_ADDRESS} -usedurablestore ${CERC_NITRO_USE_DURABLE_STORE} -durablestorefolder ${CERC_NITRO_DURABLE_STORE_FOLDER} -tlscertfilepath "" -tlsKeyFilepath ""
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
#!/bin/sh
|
||||
|
||||
read_nitro_addresses() {
|
||||
nitro_addresses_file="/app/deployment/nitro-addresses.json"
|
||||
|
||||
# Check if CERC_NA_ADDRESS environment variable is set
|
||||
if [ -n "$CERC_NA_ADDRESS" ]; then
|
||||
echo "CERC_NA_ADDRESS is set to '$CERC_NA_ADDRESS'"
|
||||
echo "CERC_VPA_ADDRESS is set to '$CERC_VPA_ADDRESS'"
|
||||
echo "CERC_CA_ADDRESS is set to '$CERC_CA_ADDRESS'"
|
||||
echo "Using the above Nitro addresses"
|
||||
|
||||
export NITRO_NA_ADDRESS=${CERC_NA_ADDRESS}
|
||||
export NITRO_VPA_ADDRESS=${CERC_VPA_ADDRESS}
|
||||
export NITRO_CA_ADDRESS=${CERC_CA_ADDRESS}
|
||||
else
|
||||
# Read addresses from a file
|
||||
# Keep retrying until found
|
||||
echo "Reading Nitro addresses from ${nitro_addresses_file}"
|
||||
retry_interval=5
|
||||
while true; do
|
||||
if [[ -e "$nitro_addresses_file" ]]; then
|
||||
export NITRO_NA_ADDRESS=$(jq -r '.nitroAdjudicatorAddress' ${nitro_addresses_file})
|
||||
export NITRO_VPA_ADDRESS=$(jq -r '.virtualPaymentAppAddress' ${nitro_addresses_file})
|
||||
export NITRO_CA_ADDRESS=$(jq -r '.consensusAppAddress' ${nitro_addresses_file})
|
||||
|
||||
break
|
||||
else
|
||||
echo "File not yet available, retrying in $retry_interval seconds..."
|
||||
sleep $retry_interval
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
wait_for_nitro_endpoint() {
|
||||
retry_interval=5
|
||||
while true; do
|
||||
curl -I -s -o /dev/null $NITRO_ENDPOINT/health
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Nitro endpoint is up"
|
||||
break
|
||||
else
|
||||
echo "Nitro endpoint not available yet, retrying in $retry_interval seconds..."
|
||||
sleep $retry_interval
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$NITRO_RUN_NODE_IN_PROCESS" = "true" ]; then
|
||||
read_nitro_addresses
|
||||
else
|
||||
wait_for_nitro_endpoint
|
||||
fi
|
||||
|
||||
echo "Beginning the ipld-eth-server process"
|
||||
|
||||
START_CMD="./ipld-eth-server"
|
||||
if [ "true" == "$CERC_REMOTE_DEBUG" ] && [ -x "/usr/local/bin/dlv" ]; then
|
||||
START_CMD="/usr/local/bin/dlv --listen=:40000 --headless=true --api-version=2 --accept-multiclient exec `pwd`/ipld-eth-server --continue --"
|
||||
fi
|
||||
|
||||
echo running: $START_CMD ${VDB_COMMAND} --config=`pwd`/config.toml
|
||||
$START_CMD ${VDB_COMMAND} --config=`pwd`/config.toml
|
||||
rv=$?
|
||||
|
||||
if [ $rv != 0 ]; then
|
||||
echo "ipld-eth-server startup failed"
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,6 @@
|
||||
CERC_ETHPXY_LISTEN_PORT=8547
|
||||
CERC_ETHPXY_LISTEN_ADDR='0.0.0.0'
|
||||
CERC_ETHPXY_REDIS_URL='redis://mainnet-eth-api-proxy-redis:6379'
|
||||
CERC_ETHPXY_REDIS_MAX_AGE=120000
|
||||
CERC_ETHPXY_GETH_WS_URL='ws://mainnet-eth-geth-1:8546'
|
||||
CERC_ETHPXY_GETH_HTTP_URL='http://mainnet-eth-geth-1:8545'
|
||||
@@ -0,0 +1,15 @@
|
||||
DATABASE_HOSTNAME="ipld-eth-db"
|
||||
DATABASE_NAME="cerc"
|
||||
DATABASE_PASSWORD="CHANGEME"
|
||||
DATABASE_PORT=5432
|
||||
DATABASE_USER="vdbm"
|
||||
|
||||
POSTGRES_DB="${DATABASE_NAME}"
|
||||
POSTGRES_PASSWORD="${DATABASE_PASSWORD}"
|
||||
POSTGRES_USER="${DATABASE_USER}"
|
||||
|
||||
CERC_STATEDIFF_DB_HOST="${DATABASE_HOSTNAME}"
|
||||
CERC_STATEDIFF_DB_NAME="${DATABASE_NAME}"
|
||||
CERC_STATEDIFF_DB_PASSWORD="${DATABASE_PASSWORD}"
|
||||
CERC_STATEDIFF_DB_PORT=${DATABASE_PORT}
|
||||
CERC_STATEDIFF_DB_USER="${DATABASE_USER}"
|
||||
@@ -0,0 +1,33 @@
|
||||
[database]
|
||||
name = "" # $DATABASE_NAME
|
||||
hostname = "" # $DATABASE_HOSTNAME
|
||||
port = 5432 # $DATABASE_PORT
|
||||
user = "" # $DATABASE_USER
|
||||
password = "" # $DATABASE_PASSWORD
|
||||
|
||||
[log]
|
||||
level = "info" # $LOG_LEVEL
|
||||
|
||||
[server]
|
||||
ipc = false
|
||||
ipcPath = "" # $SERVER_IPC_PATH
|
||||
ws = false
|
||||
wsPath = "0.0.0.0:8080" # $SERVER_WS_PATH
|
||||
http = true
|
||||
httpPath = "0.0.0.0:8081" # $SERVER_HTTP_PATH
|
||||
graphql = false # $SERVER_GRAPHQL
|
||||
graphqlPath = "0.0.0.0:8082" # $SERVER_GRAPHQL_PATH
|
||||
|
||||
[ethereum]
|
||||
chainConfig = "" # ETH_CHAIN_CONFIG
|
||||
chainID = "1" # $ETH_CHAIN_ID
|
||||
rpcGasCap = "1000000000000" # $ETH_RPC_GAS_CAP
|
||||
httpPath = "mainnet-eth-geth-1:8545" # $ETH_HTTP_PATH
|
||||
supportsStateDiff = true # $ETH_SUPPORTS_STATEDIFF
|
||||
stateDiffTimeout = "4m" # $ETH_STATEDIFF_TIMEOUT
|
||||
forwardEthCalls = false # $ETH_FORWARD_ETH_CALLS
|
||||
proxyOnError = true # $ETH_PROXY_ON_ERROR
|
||||
nodeID = "" # $ETH_NODE_ID
|
||||
clientName = "" # $ETH_CLIENT_NAME
|
||||
genesisBlock = "" # $ETH_GENESIS_BLOCK
|
||||
networkID = "1" # $ETH_NETWORK_ID
|
||||
@@ -0,0 +1,27 @@
|
||||
CERC_REMOTE_DEBUG="false"
|
||||
|
||||
LOG_LEVEL="debug"
|
||||
|
||||
ETH_CHAIN_ID=1
|
||||
ETH_CLIENT_NAME="Geth"
|
||||
ETH_FORWARD_ETH_CALLS="false"
|
||||
ETH_FORWARD_GET_STORAGE_AT="false"
|
||||
ETH_GENESIS_BLOCK="0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"
|
||||
ETH_HTTP_PATH="mainnet-eth-geth-1:8545"
|
||||
ETH_NETWORK_ID=1
|
||||
ETH_NODE_ID=1112
|
||||
ETH_PROXY_ON_ERROR="true"
|
||||
ETH_RPC_GAS_CAP=1000000000000
|
||||
ETH_SUPPORTS_STATEDIFF="true"
|
||||
ETH_STATEDIFF_TIMEOUT=4m
|
||||
|
||||
SERVER_HTTP_PATH=0.0.0.0:8081
|
||||
SERVER_GRAPHQL="false"
|
||||
SERVER_GRAPHQLPATH=0.0.0.0:8082
|
||||
|
||||
METRICS="true"
|
||||
PROM_HTTP="true"
|
||||
PROM_HTTP_ADDR="0.0.0.0"
|
||||
PROM_HTTP_PORT="8090"
|
||||
|
||||
VDB_COMMAND="serve"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,32 @@
|
||||
POSTGRES_DB=keycloak
|
||||
POSTGRES_USER=keycloak
|
||||
POSTGRES_PASSWORD=keycloak
|
||||
# Don't change this unless you also change the healthcheck in docker-compose-mainnet-eth-keycloak.yml
|
||||
PGPORT=35432
|
||||
KC_DB=postgres
|
||||
KC_DB_URL_HOST=keycloak-db
|
||||
KC_DB_URL_PORT=${PGPORT}
|
||||
KC_DB_URL_DATABASE=${POSTGRES_DB}
|
||||
KC_DB_USERNAME=${POSTGRES_USER}
|
||||
KC_DB_PASSWORD=${POSTGRES_PASSWORD}
|
||||
KC_DB_SCHEMA=public
|
||||
KC_HOSTNAME=localhost
|
||||
KC_HTTP_ENABLED="true"
|
||||
KC_HTTP_RELATIVE_PATH="/auth"
|
||||
KC_HOSTNAME_STRICT_HTTPS="false"
|
||||
KEYCLOAK_ADMIN=admin
|
||||
KEYCLOAK_ADMIN_PASSWORD=admin
|
||||
X_API_CHECK_REALM=cerc
|
||||
X_API_CHECK_CLIENT_ID="%user_id%"
|
||||
|
||||
|
||||
# keycloak-reg-api
|
||||
CERC_KCUSERREG_LISTEN_PORT=9292
|
||||
CERC_KCUSERREG_LISTEN_ADDR='0.0.0.0'
|
||||
CERC_KCUSERREG_API_URL='http://keycloak:8080/auth'
|
||||
CERC_KCUSERREG_REG_USER="${KEYCLOAK_ADMIN}"
|
||||
CERC_KCUSERREG_REG_PW="${KEYCLOAK_ADMIN_PASSWORD}"
|
||||
CERC_KCUSERREG_REG_CLIENT_ID='admin-cli'
|
||||
CERC_KCUSERREG_TARGET_REALM=cerc
|
||||
CERC_KCUSERREG_TARGET_GROUPS=eth
|
||||
CERC_KCUSERREG_CREATE_ENABLED=true
|
||||
@@ -0,0 +1,117 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name my.example.com;
|
||||
|
||||
# See: https://github.com/acmesh-official/acme.sh/wiki/Stateless-Mode
|
||||
# and https://datatracker.ietf.org/doc/html/rfc8555
|
||||
location ~ ^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$ {
|
||||
default_type text/plain;
|
||||
return 200 "$1.MY_ACCOUNT_THUMBPRINT_GOES_HERE";
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
upstream geth-pool {
|
||||
server server-a:8545 max_fails=10 fail_timeout=2s;
|
||||
server server-c:8545 max_fails=10 fail_timeout=2s backup;
|
||||
server server-b:8545 max_fails=10 fail_timeout=2s backup;
|
||||
keepalive 200;
|
||||
}
|
||||
|
||||
upstream reg-ui-pool {
|
||||
keepalive 2;
|
||||
server server-a:8085;
|
||||
}
|
||||
|
||||
upstream reg-api-pool {
|
||||
keepalive 2;
|
||||
server server-a:8086;
|
||||
}
|
||||
|
||||
# auth uses the reg server when available
|
||||
upstream auth-pool {
|
||||
keepalive 10;
|
||||
server server-a:8080;
|
||||
server server-b:8080 backup;
|
||||
server server-c:8080 backup;
|
||||
}
|
||||
|
||||
|
||||
log_format upstreamlog '[$time_local] $msec $remote_addr $user_id - $server_name($host) to $upstream_addr: $request $status upstream_response_time $upstream_response_time request_time $request_time';
|
||||
proxy_cache_path /var/cache/nginx/auth_cache levels=1 keys_zone=auth_cache:1m max_size=5m inactive=60m;
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name my.example.com;
|
||||
keepalive_requests 500000;
|
||||
keepalive_timeout 90s;
|
||||
http2_max_requests 5000000;
|
||||
http2_max_concurrent_streams 1024;
|
||||
http2_idle_timeout 3m;
|
||||
http2_recv_timeout 30s;
|
||||
access_log /var/log/nginx/my.example.com-access.log upstreamlog;
|
||||
error_log /var/log/nginx/my.example.com-error.log;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/my.example.com/cert.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/my.example.com/key.pem;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
#rewrite ^/?$ /newuser/;
|
||||
rewrite ^/?$ https://www.example.com/;
|
||||
|
||||
# geth-pool ETH API
|
||||
location ~ ^/v1/eth/?([^/]*)$ {
|
||||
set $apiKey $1;
|
||||
if ($apiKey = '') {
|
||||
set $apiKey $http_X_API_KEY;
|
||||
}
|
||||
auth_request /auth;
|
||||
auth_request_set $user_id $sent_http_x_user_id;
|
||||
rewrite /.*$ / break;
|
||||
|
||||
client_max_body_size 3m;
|
||||
client_body_buffer_size 3m;
|
||||
proxy_buffer_size 32k;
|
||||
proxy_buffers 16 32k;
|
||||
proxy_busy_buffers_size 96k;
|
||||
|
||||
proxy_pass http://geth-pool;
|
||||
proxy_set_header X-Original-Remote-Addr $remote_addr;
|
||||
proxy_set_header X-User-Id $user_id;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
}
|
||||
|
||||
# keycloak
|
||||
location = /auth {
|
||||
internal;
|
||||
proxy_cache auth_cache;
|
||||
proxy_cache_key "$apiKey";
|
||||
proxy_cache_valid 200 300s;
|
||||
proxy_cache_valid 401 30s;
|
||||
proxy_pass http://auth-pool/auth/realms/cerc/check?memberOf=eth&apiKey=$apiKey;
|
||||
proxy_pass_request_body off;
|
||||
proxy_set_header Content-Length "";
|
||||
proxy_set_header X-Original-URI $request_uri;
|
||||
proxy_set_header X-Original-Remote-Addr $remote_addr;
|
||||
proxy_set_header X-Original-Host $host;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
}
|
||||
|
||||
location /newuser/ {
|
||||
proxy_pass http://reg-ui-pool/;
|
||||
}
|
||||
|
||||
location /user-api/ {
|
||||
proxy_pass http://reg-api-pool/;
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
import psycopg
|
||||
import random
|
||||
|
||||
from subprocess import Popen
|
||||
from fabric import Connection
|
||||
|
||||
|
||||
def dump_src_db_to_file(db_host, db_port, db_user, db_password, db_name, file_name):
|
||||
command = f"pg_dump -h {db_host} -p {db_port} -U {db_user} -d {db_name} -c --inserts -f {file_name}"
|
||||
my_env = os.environ.copy()
|
||||
my_env["PGPASSWORD"] = db_password
|
||||
print(f"Exporting from {db_host}:{db_port}/{db_name} to {file_name}... ", end="")
|
||||
ret = Popen(command, shell=True, env=my_env).wait()
|
||||
print("DONE")
|
||||
return ret
|
||||
|
||||
|
||||
def establish_ssh_tunnel(ssh_host, ssh_port, ssh_user, db_host, db_port):
|
||||
local_port = random.randint(11000, 12000)
|
||||
conn = Connection(host=ssh_host, port=ssh_port, user=ssh_user)
|
||||
fw = conn.forward_local(
|
||||
local_port=local_port, remote_port=db_port, remote_host=db_host
|
||||
)
|
||||
return conn, fw, local_port
|
||||
|
||||
|
||||
def load_db_from_file(db_host, db_port, db_user, db_password, db_name, file_name):
|
||||
connstr = "host=%s port=%s user=%s password=%s sslmode=disable dbname=%s" % (
|
||||
db_host,
|
||||
db_port,
|
||||
db_user,
|
||||
db_password,
|
||||
db_name,
|
||||
)
|
||||
with psycopg.connect(connstr) as conn:
|
||||
with conn.cursor() as cur:
|
||||
print(
|
||||
f"Importing from {file_name} to {db_host}:{db_port}/{db_name}... ",
|
||||
end="",
|
||||
)
|
||||
cur.execute(open(file_name, "rt").read())
|
||||
print("DONE")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument("--src-dbhost", help="DB hostname", default="localhost")
|
||||
parser.add_argument("--src-dbport", help="DB port", default=5432, type=int)
|
||||
parser.add_argument("--src-dbuser", help="DB username", default="keycloak")
|
||||
parser.add_argument("--src-dbpw", help="DB password", required=True)
|
||||
parser.add_argument("--src-dbname", help="dbname", default="keycloak")
|
||||
|
||||
parser.add_argument(
|
||||
"--dst-file", help="Destination filename", default="keycloak-mirror.sql"
|
||||
)
|
||||
|
||||
parser.add_argument("--live-import", help="run the import", action="store_true")
|
||||
|
||||
parser.add_argument("--dst-dbhost", help="DB hostname", default="localhost")
|
||||
parser.add_argument("--dst-dbport", help="DB port", default=5432, type=int)
|
||||
parser.add_argument("--dst-dbuser", help="DB username", default="keycloak")
|
||||
parser.add_argument("--dst-dbpw", help="DB password")
|
||||
parser.add_argument("--dst-dbname", help="dbname", default="keycloak")
|
||||
|
||||
parser.add_argument("--ssh-host", help="SSH hostname")
|
||||
parser.add_argument("--ssh-port", help="SSH port", default=22, type=int)
|
||||
parser.add_argument("--ssh-user", help="SSH user")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.live_import and not args.dst_dbpw:
|
||||
print("--dst-dbpw is required if importing", file=sys.stderr)
|
||||
sys.exit(2)
|
||||
|
||||
remove_sql_file = False
|
||||
if args.dst_dbhost and not args.dst_file:
|
||||
remove_sql_file = True
|
||||
|
||||
dst_file = args.dst_file
|
||||
if not dst_file:
|
||||
dst_file = "keycloak-mirror.sql"
|
||||
|
||||
dump_src_db_to_file(
|
||||
args.src_dbhost,
|
||||
args.src_dbport,
|
||||
args.src_dbuser,
|
||||
args.src_dbpw,
|
||||
args.src_dbname,
|
||||
dst_file,
|
||||
)
|
||||
|
||||
if args.live_import:
|
||||
try:
|
||||
if args.ssh_host:
|
||||
dst_dbport = random.randint(11000, 12000)
|
||||
print(
|
||||
f"Establishing SSH tunnel from 127.0.0.1:{dst_dbport} to "
|
||||
"{args.ssh_host}->{args.dst_dbhost}:{args.dst_dbport}... ",
|
||||
end="",
|
||||
)
|
||||
with Connection(
|
||||
host=args.ssh_host, port=args.ssh_port, user=args.ssh_user
|
||||
).forward_local(
|
||||
local_port=dst_dbport,
|
||||
remote_port=args.dst_dbport,
|
||||
remote_host=args.dst_dbhost,
|
||||
):
|
||||
print("DONE")
|
||||
|
||||
load_db_from_file(
|
||||
args.dst_dbhost,
|
||||
args.dst_dbport,
|
||||
args.dst_dbuser,
|
||||
args.dst_dbpw,
|
||||
args.dst_dbname,
|
||||
dst_file,
|
||||
)
|
||||
else:
|
||||
load_db_from_file(
|
||||
args.dst_dbhost,
|
||||
args.dst_dbport,
|
||||
args.dst_dbuser,
|
||||
args.dst_dbpw,
|
||||
args.dst_dbname,
|
||||
dst_file,
|
||||
)
|
||||
|
||||
finally:
|
||||
if args.live_import:
|
||||
print(f"Removing {dst_file}... ", end="")
|
||||
os.remove(dst_file)
|
||||
print("DONE")
|
||||
@@ -0,0 +1,3 @@
|
||||
fabric
|
||||
psycopg~=3.1.8
|
||||
psycopg_binary
|
||||
@@ -0,0 +1,4 @@
|
||||
web:
|
||||
path: ''
|
||||
api:
|
||||
url: 'http://keycloak-reg-api:9292'
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user