Skip to content

Commit

Permalink
chore: refreshing localnet config update message
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Sep 3, 2024
1 parent 9f0f0d0 commit 709a946
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/algokit/cli/localnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ def reset_localnet(*, update: bool) -> None:
sandbox.write_compose_file()
elif sandbox.name == SANDBOX_BASE_NAME:
sandbox.down()
if compose_file_status is not ComposeFileStatus.UP_TO_DATE:
logger.info("Syncing LocalNet configuration")
sandbox.write_compose_file()
if update:
if compose_file_status is not ComposeFileStatus.UP_TO_DATE:
logger.info("LocalNet definition is out of date; updating it to latest")
sandbox.write_compose_file()
sandbox.pull()
else:
sandbox.check_docker_compose_for_new_image_versions()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Cleaning up the running AlgoKit LocalNet...
DEBUG: Running 'docker compose down' in '{app_config}/sandbox'
DEBUG: docker: STDOUT
DEBUG: docker: STDERR
Syncing LocalNet configuration
DEBUG: Running 'docker image inspect algorand/indexer:latest --format {{range .RepoDigests}}{{println .}}{{end}}' in '{current_working_directory}'
DEBUG: docker: tag@sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
DEBUG: HTTP Request: GET https://registry.hub.docker.com/v2/repositories/algorand/indexer/tags/latest "HTTP/1.1 200 OK"
Expand All @@ -25,6 +26,79 @@ DEBUG: AlgoKit LocalNet health check successful, algod is ready
Started; execute `algokit explore` to explore LocalNet in a web user interface.

{app_config}/sandbox/docker-compose.yml
out of date config
name: "algokit_sandbox"

services:
algod:
container_name: "algokit_sandbox_algod"
image: algorand/algod:latest
ports:
- 7833
- 9392:9392
environment:
START_KMD: 1
KMD_TOKEN: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
TOKEN: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ADMIN_TOKEN: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
GOSSIP_PORT: 10000
init: true
volumes:
- type: bind
source: ./algod_config.json
target: /etc/algorand/config.json
- type: bind
source: ./algod_network_template.json
target: /etc/algorand/template.json
- ./goal_mount:/root/goal_mount

conduit:
container_name: "algokit_sandbox_conduit"
image: algorand/conduit:latest
restart: unless-stopped
volumes:
- type: bind
source: ./conduit.yml
target: /etc/algorand/conduit.yml
depends_on:
- indexer-db
- algod

indexer-db:
container_name: "algokit_sandbox_postgres"
image: postgres:16-alpine
ports:
- 5443:5432
user: postgres
environment:
POSTGRES_USER: algorand
POSTGRES_PASSWORD: algorand
POSTGRES_DB: indexerdb

indexer:
container_name: "algokit_sandbox_indexer"
image: algorand/indexer:latest
restart: unless-stopped
command: daemon --enable-all-parameters
environment:
INDEXER_POSTGRES_CONNECTION_STRING: "host=indexer-db port=5432 user=algorand password=algorand dbname=indexerdb sslmode=disable"
depends_on:
- conduit

proxy:
container_name: "algokit_sandbox_proxy"
image: nginx:1.27.0-alpine
restart: unless-stopped
ports:
- 4001:4001
- 4002:4002
- 8980:8980
volumes:
- type: bind
source: ./nginx.conf
target: /etc/nginx/nginx.conf
depends_on:
- algod
- indexer

{app_config}/sandbox/algod_config.json
out of date config
{ "Version": 12, "GossipFanout": 1, "EndpointAddress": "0.0.0.0:8080", "DNSBootstrapID": "", "IncomingConnectionsLimit": 0, "Archival":true, "isIndexerActive":false, "EnableDeveloperAPI":true}

0 comments on commit 709a946

Please sign in to comment.