Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.

Conversation

@web3melk
Copy link

This PR implements the echo example in Ruby

@tuler
Copy link
Member

tuler commented May 25, 2023

Thank you for the contribution!

There are two important characteristics in the build of a dapp, in any language.

  1. reproducibility
  2. small images

To improve on number 1 I suggest using bundler, and committing a Gemfile and Gemfile.lock
To improve on number 2 I suggest using a multi-stage build, where stage 1 uses an image that contains ruby-dev and build-essential, and uses bundler with a local path. On stage 2 you use a slimmer runtime image and copy build results from stage 1.

@tuler
Copy link
Member

tuler commented May 30, 2023

Nice! I'm not a ruby guy, but it looks good. I'll defer to others for final review.

In the meantime I'd like to invite you to review a Ruby template for sunodo.
sunodo/sunodo-templates#12

To test it, install sunodo (brew install sunodo/tap/sunodo), then run sunodo build from the template directory.
It will build the machine, then sunodo run will run a node for the application.
I tested it and it worked fine.

@web3melk
Copy link
Author

Hi @tuler
Did you create the template based on my code?

@tuler
Copy link
Member

tuler commented Jun 12, 2023

Hi @tuler
Did you create the template based on my code?

The template is in the link above. It’s not an echo application, just the loop of fetching inputs, and a Dockerfile compatible with sunodo build system.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants