-
Notifications
You must be signed in to change notification settings - Fork 16
docs: update docs #2005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sevenzing
wants to merge
7
commits into
main
Choose a base branch
from
ll/docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
docs: update docs #2005
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4bd7456
update docker compose logic
sevenzing 6934f56
fix prev issues
sevenzing 3bd5099
fix PR comments
sevenzing afe2674
fix lint and tests
sevenzing e41d950
revert `environment` NAMESPACE just for docker devnet
sevenzing 84e1ed1
update docs
sevenzing 219a475
add ENSNODE_TAG to docs
sevenzing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,90 +1,8 @@ | ||
| # Docker Compose | ||
|
|
||
| All commands are run from the **monorepo root**. | ||
| ENSNode supports Docker Compose for local development and deployments. | ||
|
|
||
| ## Files | ||
| For canonical setup, use cases, and commands, see the docs site: | ||
|
|
||
| | File | Purpose | | ||
| | ---------------------------------------- | -------------------------------------------------------------------------------------- | | ||
| | `docker/docker-compose.yml` | Base stack — ensindexer, ensapi, ensrainbow, ensadmin, postgres. For mainnet/sepolia. | | ||
| | `docker/docker-compose.devnet.yml` | Full stack against local devnet (`ens-test-env`). Includes all base services + devnet. | | ||
| | `docker/docker-compose.orchestrator.yml` | Minimal infra for CI — devnet + postgres only. Used by `orchestrator.ts`. | | ||
| | `docker/services/*.yml` | Individual service definitions. Extended by the compose files above. | | ||
| | `docker/envs/.env.docker.common` | Shared env defaults (postgres credentials, internal service URLs). Committed. | | ||
| | `docker/envs/.env.docker.devnet` | Devnet defaults (PLUGINS, etc.). Committed. Works out of the box. | | ||
| | `docker/envs/.env.docker.example` | Example for user-specific config. Copy to `.env.docker.local` for mainnet/sepolia. | | ||
| | `docker/envs/.env.docker.local` | User config (gitignored). Required for base stack, optional for devnet overrides. | | ||
|
|
||
| > To inspect the fully resolved config for any compose file (resolves all `extends`): | ||
| > | ||
| > ``` | ||
| > docker compose -f docker/docker-compose.yml config | ||
| > ``` | ||
|
|
||
| ## Use cases | ||
|
|
||
| ### Mainnet / Sepolia | ||
|
|
||
| **1. Configure environment** (one-time setup): | ||
|
|
||
| ```bash | ||
| cp docker/envs/.env.docker.example docker/envs/.env.docker.local | ||
| ``` | ||
|
|
||
| Edit `docker/envs/.env.docker.local` and set `NAMESPACE`, `PLUGINS`, and your RPC endpoints (e.g. `ALCHEMY_API_KEY` or `RPC_URL_1`). | ||
|
|
||
| **2. Start/stop the stack:** | ||
|
|
||
| ```bash | ||
| # Start full stack in background | ||
| docker compose -f docker/docker-compose.yml up -d | ||
|
|
||
| # Stop | ||
| docker compose -f docker/docker-compose.yml down | ||
|
|
||
| # Stop and remove volumes | ||
| docker compose -f docker/docker-compose.yml down -v | ||
| ``` | ||
|
|
||
| ### Local devnet (for developers) | ||
|
|
||
| No setup required — devnet defaults are committed in `docker/envs/.env.docker.devnet`. | ||
|
|
||
| To override defaults (e.g. change `PLUGINS`), create `docker/envs/.env.docker.local` with your values. | ||
|
|
||
| ```bash | ||
| # Start full stack against devnet | ||
| docker compose -f docker/docker-compose.devnet.yml up -d | ||
|
|
||
| # Start only devnet + core services (no ensadmin) | ||
| docker compose -f docker/docker-compose.devnet.yml up -d devnet postgres ensrainbow ensindexer ensapi | ||
|
|
||
| # Start only devnet (quick local EVM node, also shows data information about devnet) | ||
| docker compose -f docker/docker-compose.devnet.yml up devnet | ||
| # or | ||
| pnpm devnet | ||
|
|
||
| # Stop | ||
| docker compose -f docker/docker-compose.devnet.yml down | ||
| ``` | ||
|
|
||
| ### Build images locally | ||
|
|
||
| ```bash | ||
| # Build all images | ||
| pnpm docker:build:ensnode | ||
|
|
||
| # Build a specific image | ||
| pnpm docker:build:ensindexer | ||
| pnpm docker:build:ensapi | ||
| pnpm docker:build:ensrainbow | ||
| pnpm docker:build:ensadmin | ||
| ``` | ||
|
|
||
| ### CI / integration tests | ||
|
|
||
| Used internally by `orchestrator.ts` via testcontainers. Starts devnet + postgres only. | ||
|
|
||
| ```bash | ||
| pnpm test:integration:ci | ||
| ``` | ||
| - [Deploying ENSNode with Docker](https://ensnode.io/docs/deploying/docker) | ||
| - [ENSNode Quickstart](https://ensnode.io/docs) |
This file contains hidden or 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 hidden or 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,22 +1,22 @@ | ||
| # Minimal compose for CI integration tests. | ||
| # Provides only the infrastructure services needed by orchestrator.ts: | ||
| # devnet (local EVM) and postgres (database). | ||
| # devnet (local EVM) and ensdb (database). | ||
| services: | ||
| devnet: | ||
| extends: | ||
| file: services/devnet.yml | ||
| service: devnet | ||
|
|
||
| postgres: | ||
| ensdb: | ||
| extends: | ||
| file: services/postgres.yml | ||
| service: postgres | ||
| file: services/ensdb.yml | ||
| service: ensdb | ||
| env_file: | ||
| - path: ./envs/.env.docker.common | ||
| - path: envs/.env.docker.common | ||
| required: true | ||
|
|
||
| volumes: | ||
| # Docker Compose requires volumes used by services to be declared in each | ||
| # compose file that references them — they cannot be inherited via `extends`. | ||
| postgres_data: | ||
| ensdb_data: | ||
| driver: local |
This file contains hidden or 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 hidden or 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,16 +1,15 @@ | ||
| # Shared Docker Compose environment variables | ||
| # Used by docker/docker-compose.yml and its variants | ||
|
|
||
|
|
||
| # Postgres | ||
| POSTGRES_DB=postgres | ||
| POSTGRES_USER=postgres | ||
| POSTGRES_PASSWORD=password | ||
|
|
||
| # Internal service URLs (container-to-container) | ||
| ENSDB_URL=postgresql://postgres:password@postgres:5432/postgres | ||
| ENSDB_URL=postgresql://postgres:password@ensdb:5432/postgres | ||
| ENSRAINBOW_URL=http://ensrainbow:3223 | ||
|
|
||
| # ENS Admin | ||
| # ENSAdmin | ||
| ENSADMIN_PUBLIC_URL=http://localhost:4173 | ||
| NEXT_PUBLIC_SERVER_CONNECTION_LIBRARY=http://localhost:4334 |
This file contains hidden or 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,6 +1,22 @@ | ||
| # Default configuration for devnet docker-compose stack. | ||
| # These values work out of the box — override by creating .env.docker.local. | ||
|
|
||
| # ENSIndexer | ||
| PLUGINS=subgraph,ensv2 | ||
| # ENSIndexer and ENSRainbow | ||
| NAMESPACE=ens-test-env | ||
| # ENSIndexer and ENSApi | ||
| ENSINDEXER_SCHEMA_NAME=docker_devnet_v1 | ||
| # ENSIndexer and ENSApi | ||
| RPC_URL_1=http://devnet:8545 | ||
| # ENSIndexer and ENSRainbow | ||
| LABEL_SET_VERSION=0 | ||
| # ENSIndexer and ENSRainbow | ||
| LABEL_SET_ID=ens-test-env | ||
| # ENSRainbow | ||
| DB_SCHEMA_VERSION=3 | ||
|
|
||
|
|
||
| # TODO: in future we will migrate devnet to chain_id=1 | ||
| # need to remove `RPC_URL_15658733` in that case | ||
| RPC_URL_15658733=http://devnet:8545 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.