Git Product home page Git Product logo

drizzle-truffle-ganache-docker-box's Introduction

Drizzle Truffle Ganache Docker Box

This box followed the official drizzle tutorial (https://www.trufflesuite.com/tutorials/getting-started-with-drizzle-and-react), but built on top of docker/docker-compose.

There are two docker services in docker-compose:

  • ganache-cli (located at /ganache/..):

    • Build on top of the official ganache image trufflesuite/ganache-cli:latest
    • Modified ENTRYPOINT to run script ganache_with_accounts.sh, so that everytime ganache restarts, the same Ethereum accounts were created.
    • Port 8545:8545
  • truffle-drizzle (located at /truffledrizzle/..)

    • Build on top of node:10
    • During the build stage, it will perform the following in order:
      • Install truffle
      • Move contract files
      • Move React files.
      • npm ci
    • During the run stage, it will perform the following in order:
      • truffle build
      • truffle test
      • truffle migrate
      • copy compiled contracts to the react project
      • run the react project
    • Note that since we created a volume for the React project (- ./truffledrizzle/client/src:/client/src), the front end code supports hot editing.

A few more things worth to mention:

dev_build.sh builds the docker images according to docker-compose-dev.yml dev_run.sh starts the docker-compose as defined in docker-compose-dev.yml npm_install.sh creates a temp node container, in case we want to modify package-lock.json. (This project does not require node to be installed on local machine! :)

drizzle-truffle-ganache-docker-box's People

Contributors

lzhou1110 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.