-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ECO-2158] Create a docker image for starting the
emojicoin_dot_fun
…
… local testnet for e2e testing locally and in CI (#228) Co-authored-by: matt <[email protected]> Co-authored-by: alnoki <[email protected]>
- Loading branch information
1 parent
5bae3a4
commit cc2edb3
Showing
25 changed files
with
1,769 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,48 @@ | ||
# yamllint disable rule:empty-lines rule:key-ordering rule:brackets | ||
# yamllint disable rule:empty-lines rule:key-ordering | ||
# cspell:word localnet | ||
|
||
# Services in this file are EXCLUSIVELY for running a local testnet. | ||
--- | ||
include: | ||
# This setup allows us to only have to specify only one compose file. | ||
- path: | ||
- 'compose.yaml' | ||
- 'processor.overrides.yaml' | ||
name: 'emojicoin-dot-fun' | ||
services: | ||
aptos-node: | ||
localnet: | ||
network_mode: 'host' | ||
container_name: 'localnet' | ||
build: | ||
context: '../../' | ||
dockerfile: 'src/docker/aptos-node/Dockerfile' | ||
ports: | ||
- '50051:50051' | ||
- '8070:8070' | ||
- '8090:8090' | ||
- '8080:8080' | ||
- '8081:8081' | ||
dockerfile: 'src/docker/localnet/Dockerfile' | ||
healthcheck: | ||
test: ['CMD', 'curl', '-f', 'http://localhost:8070/'] | ||
interval: '30s' | ||
timeout: '10s' | ||
test: | ||
- 'CMD' | ||
- 'sh/healthcheck.sh' | ||
interval: '5s' | ||
timeout: '5s' | ||
retries: 5 | ||
start_period: '30s' | ||
command: ['bash', '/app/run-fullnode.sh'] | ||
# In order to start the node with the indexer API; i.e., run | ||
# `aptos node run-local-testnet --with-indexer-api`, the Docker socket must | ||
# be mounted to the container. This mount enables the container to start a | ||
# new container. Note that this is *not* "Docker-in-Docker", but rather | ||
# "Docker-outside-Docker". That is, the container can act as the host in | ||
# terms of creating and orchestrating other containers but still appears as | ||
# a sibling to the existing containers and any new containers it creates. | ||
entrypoint: | ||
- '/bin/bash' | ||
- '/app/sh/run-localnet.sh' | ||
volumes: | ||
- '/var/run/docker.sock:/var/run/docker.sock' | ||
|
||
move: | ||
- './localnet/.aptos/testnet:/app/.aptos/testnet' | ||
deployer: | ||
extra_hosts: | ||
- 'host.docker.internal:host-gateway' | ||
build: | ||
context: '../../' | ||
dockerfile: 'src/docker/aptos-node/Dockerfile' | ||
dockerfile: 'src/docker/deployer/Dockerfile' | ||
args: | ||
PUBLISHER_PRIVATE_KEY: '${PUBLISHER_PRIVATE_KEY}' | ||
environment: | ||
PUBLISHER_PRIVATE_KEY: '${PUBLISHER_PRIVATE_KEY}' | ||
BIG_MONEY_GUY_PRIVATE_KEY: '${BIG_MONEY_GUY_PRIVATE_KEY}' | ||
EMOJICOIN_MODULE_ADDRESS: '${EMOJICOIN_MODULE_ADDRESS}' | ||
image: 'econialabs/emojicoin-dot-fun-deployer:latest' | ||
container_name: 'deployer' | ||
depends_on: | ||
aptos-node: | ||
localnet: | ||
condition: 'service_healthy' | ||
command: ['bash', '/app/initialize-contract.sh'] | ||
|
||
processor: | ||
depends_on: | ||
move: | ||
condition: 'service_completed_successfully' | ||
... |
Oops, something went wrong.