Skip to content
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

add docker file #155

Closed
wants to merge 1 commit into from
Closed

add docker file #155

wants to merge 1 commit into from

Conversation

johnongit
Copy link

No description provided.

@mariocynicys
Copy link
Collaborator

I think is PR is missing some.
How would the configuration be fed?
How would the tower talk to bitcoin daemon?
Where would the bitcoin daemon ideally be?
Also shouldn't there be an entry point for the image?

@johnongit
Copy link
Author

Hi.

This a simple docker file.
Currently, I'm running it by adding "toesd" command during the startup.
For the configuration, we just need to create teos.toml on your file system (like ./data/rust-teos/) and use the mount capacity of docker (./data/rust-teos:/root/.teos). Here an example of a docker-compose file

rust-teos:
image: johnonchain/rust-teso:arm
container_name: rust-teos
ports:
- 9814:9814
volumes:
- ./data/rust-teos:/root/.teos
command: teosd
networks:
net:
ipv4_address: $TEOS_IP

Depending on where your bitcoind is running, in my case, the deamon is running on a separate container but in the same docker network. Here an teos.toml example.

btc_network = "mainnet"
btc_rpc_user = "bitcoin-ser"
btc_rpc_password = "password
btc_rpc_connect = "<bitcoin container IP address"
btc_rpc_port = 8332

I can control the deamon with docker exec like this
docker exec teos teos-cli gettowerinfo

@mariocynicys
Copy link
Collaborator

Cool!
I was thinking of having the configuration be fed somehow using docker compose/ENV variables, but a volume sound like a good idea.

Would you please document how to use the dockerized form with docker compose or the long docker command in INSTALL.md.

@sr-gi sr-gi self-assigned this Nov 25, 2022
@sr-gi
Copy link
Member

sr-gi commented Nov 28, 2022

Thanks for taking care of this @johnongit. I think we can reuse part of the docker config we used to use for python-teos where, as @mariocynicys mentioned, we were using ENV variables to pass the desired config to the container.

I think both methods may work, but they would need to be minimally documented. Here are the old Docker files (that may need to be updated with yours) plus the old docs:

Dockerfile: https://github.com/talaia-labs/python-teos/blob/master/docker/Dockerfile
entrypoint: https://github.com/talaia-labs/python-teos/blob/master/docker/entrypoint.sh
docs: https://github.com/talaia-labs/python-teos#running-teos-in-a-docker-container

@sr-gi
Copy link
Member

sr-gi commented Jul 27, 2023

Closing this given it'll be superseded by #227

@sr-gi sr-gi closed this Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants