-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
056a75c
commit e6d85a6
Showing
8 changed files
with
173 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
DATABASE_URL=postgres://mina:whatever@localhost:5432/archive | ||
RUST_LOG=debug,error,mina_mesh=info | ||
RUST_ENV=production |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM rust | ||
|
||
WORKDIR /app | ||
|
||
COPY Cargo.toml Cargo.lock ./ | ||
COPY mesh_generated/ ./mesh_generated | ||
COPY mina_mesh/ ./mina_mesh | ||
|
||
RUN cargo build --release | ||
|
||
ENTRYPOINT ["/app/target/release/mina-mesh", "serve"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
services: | ||
mina_mesh: | ||
build: . | ||
entrypoint: | ||
- bash | ||
- -c | ||
- sleep 1000 | ||
environment: | ||
MINA_PROXY_GRAPHQL_URL: "https://mainnet.minaprotocol.network/graphql" | ||
ARCHIVE_DATABASE_URL: "postgres://postgres:postgres@postgres:5432/archive" | ||
GENESIS_BLOCK_IDENTIFIER_HEIGHT: "359605" | ||
GENESIS_BLOCK_IDENTIFIER_STATE_HASH: "3NK4BpDSekaqsG6tx8Nse2zJchRft2JpnbvMiog55WCr5xJZaKeP" | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
postgres: | ||
container_name: archive-db | ||
image: postgres | ||
restart: always | ||
environment: | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: archive | ||
healthcheck: | ||
test: [ | ||
"CMD-SHELL", | ||
"psql -U postgres -d archive -tAc \"SELECT COUNT(*) FROM pg_database WHERE datname='archive';\" | grep -q '^1$'", | ||
Check warning on line 26 in docker-compose.yaml GitHub Actions / cspell
|
||
] | ||
interval: 5s | ||
timeout: 10s | ||
retries: 10 | ||
volumes: | ||
- "./archive/postgresql/data:/var/lib/postgresql/data" | ||
ports: | ||
- "5432:5432" | ||
bootstrap_db: | ||
image: "minaprotocol/mina-archive:3.0.0-93e0279-bullseye" | ||
# image: 'gcr.io/o1labs-192920/mina-archive:3.0.0-dc6bf78-bullseye' # Use this image for Devnet | ||
command: > | ||
bash -c ' | ||
exit 0; #comment out to activate auto-import | ||
curl -O https://673156464838-mina-archive-node-backups.s3.us-west-2.amazonaws.com/mainnet/mainnet-archive-dump-$(date +%F_0000).sql.tar.gz; | ||
tar -zxvf mainnet-archive-dump-$(date +%F_0000).sql.tar.gz; | ||
psql postgres://postgres:postgres@postgres:5432/archive -c " | ||
ALTER SYSTEM SET max_connections = 500; | ||
ALTER SYSTEM SET max_locks_per_transaction = 100; | ||
ALTER SYSTEM SET max_pred_locks_per_relation = 100; | ||
ALTER SYSTEM SET max_pred_locks_per_transaction = 5000; | ||
" | ||
psql postgres://postgres:postgres@postgres:5432/archive -f mainnet-archive-dump-$(date +%F_0000).sql; | ||
' | ||
# For Devnet Network, replace "mainnet" references with "devnet" in the block above | ||
Check warning on line 51 in docker-compose.yaml GitHub Actions / cspell
|
||
depends_on: | ||
postgres: | ||
condition: service_healthy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters