Skip to content

Commit

Permalink
Write minimal composer file
Browse files Browse the repository at this point in the history
  • Loading branch information
nrosa-valory committed Jan 28, 2025
1 parent 005353b commit bc68076
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
19 changes: 11 additions & 8 deletions autonomy/deploy/generators/docker_compose/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
PORT_MAPPING_CONFIG,
TENDERMINT_CONFIG_TEMPLATE,
TENDERMINT_NODE_TEMPLATE,
MINIMAL_DOCKER_COMPOSE_TEMPLATE
)


Expand Down Expand Up @@ -423,14 +424,16 @@ def generate(
network_address=network.next_address,
)

self.output = DOCKER_COMPOSE_TEMPLATE.format(
abci_nodes=agents,
tendermint_nodes=tendermint_nodes,
hardhat_node=hardhat_node,
acn_node=acn_node,
network_name=network_name,
subnet=str(network.subnet),
)
# self.output = DOCKER_COMPOSE_TEMPLATE.format(
# abci_nodes=agents,
# tendermint_nodes=tendermint_nodes,
# hardhat_node=hardhat_node,
# acn_node=acn_node,
# network_name=network_name,
# subnet=str(network.subnet),
# )

self.output = MINIMAL_DOCKER_COMPOSE_TEMPLATE

return self

Expand Down
11 changes: 11 additions & 0 deletions autonomy/deploy/generators/docker_compose/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@
"""bash /app/build.sh "{validators}" "{hosts}" "{user}" """
)

MINIMAL_DOCKER_COMPOSE_TEMPLATE: str = """
version: '3.8'
services:
app:
image: nrosavalory/langchain-agent
ports:
- "8080:80"
"""

DOCKER_COMPOSE_TEMPLATE: str = """version: "2.4"
services:
{hardhat_node}{acn_node}{tendermint_nodes}{abci_nodes}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ mkdocs-monorepo-plugin = "^1.0.5"

[build-system]
requires = ["setuptools", "wheel","poetry-core>=1.0.0"]
build_backend = "setuptools.build_meta"
build-backend = "setuptools.build_meta"

0 comments on commit bc68076

Please sign in to comment.