NebulousLabs / docker-sia

The official docker image for the Sia daemon
https://sia.tech
MIT License
20 stars 1 forks source link

Support for dev image #37

Closed kwypchlo closed 3 years ago

kwypchlo commented 4 years ago

Due to debugging constraints when working with a pre-compiled binaries we should provide a dev image that:

The idea is to be able to debug production servers like this:

  1. turn off health-check and wait for the server to be out of load balancer
  2. run docker stop sia to stop the sia container
  3. change the image in docker-compose.yml to dev
  4. run docker exec -it sia /bin/bash to ssh to sia container
  5. you should be in ~/Sia git directory where the master is checked out
  6. you change branch or edit your changes and run make to compile binaries
  7. run exit to exit sia container shell
  8. run docker restart sia to restart sia container with your changes on it
ro-tex commented 4 years ago

So, we need a second container, alongside the main production container that the portal is going to be using. This second container should have the dev tools needed to build siad and the source code. This part is easy and straightforward.

The debug container should be able to build siac and siad binaries which, crucially, should be used by the main production container after it's restarted. No problem there but there are some considerations.

The way to do it:

Considerations:

ro-tex commented 4 years ago

@kwypchlo your proposal can definitely work. I actually like it more than mine. Let's do that.