We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
podman-compose
I tripped up on these two issues:
docker compose
services: oracle: environment: CONTRACT_ADDRESS: 0x5FbDB2315678afecb367f032d93F642f64180aa3 entrypoint: /bin/sh -c 'python main.py --network http://sapphire-localnet:8545 --ollama-address http://ollama:11434 --secret 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 $${CONTRACT_ADDRESS}'
The CONTRACT_ADDRESS will be empty in podman-compose. Injecting the variable directly inside entrypoint seems to be the only way currently
CONTRACT_ADDRESS
entrypoint
services: oracle: entrypoint: /bin/sh -c 'python main.py --network http://sapphire-localnet:8545 --ollama-address http://ollama:11434 --secret 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 0x5FbDB2315678afecb367f032d93F642f64180aa3'
depends_on
oracle
oracle: environment: CONTRACT_ADDRESS: 0x5FbDB2315678afecb367f032d93F642f64180aa3 build: dockerfile: Dockerfile.oracle entrypoint: /bin/sh -c 'python main.py --network http://sapphire-localnet:8545 --ollama-address http://ollama:11434 --secret 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 $${CONTRACT_ADDRESS}' restart: on-failure depends_on: contracts: condition: service_completed_successfully
will be started prematurely before the contracts are deployed. Adding some sleep can solve the issue:
sleep
oracle: build: dockerfile: Dockerfile.oracle entrypoint: /bin/sh -c 'sleep 100; python main.py --network http://sapphire-localnet:8545 --ollama-address http://ollama:11434 --secret 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 0x5FbDB2315678afecb367f032d93F642f64180aa3' restart: on-failure
Document both caveats somewhere at the end of https://docs.oasis.io/build/rofl/app probably?
The text was updated successfully, but these errors were encountered:
The above syntax seems incorrect to me, where did you see that $${CONTRACT_ADDRESS} would work? Did you try the regular $CONTRACT_ADDRESS instead?
$${CONTRACT_ADDRESS}
$CONTRACT_ADDRESS
$ export FOO=3 $ bash -c 'echo $FOO' 3 $ bash -c 'echo $$FOO' 2606301FOO $ bash -c 'echo $${FOO}' 2606302{FOO}
Because $$ expands to PID.
$$
Sorry, something went wrong.
matevz
No branches or pull requests
I tripped up on these two issues:
docker compose
:The
CONTRACT_ADDRESS
will be empty inpodman-compose
. Injecting the variable directly insideentrypoint
seems to be the only way currentlydepends_on
directive doesn't work. So thisoracle
:will be started prematurely before the contracts are deployed. Adding some
sleep
can solve the issue:Document both caveats somewhere at the end of https://docs.oasis.io/build/rofl/app probably?
The text was updated successfully, but these errors were encountered: