Making GHCS experience faster and smoother -- WIP -- #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Running
dapp-agoric-basicson GHCS -- WIP --This README outlines the instructions, directions, and steps currently being followed in this PR to make the experience of using GHCS more efficient. For the most part the instructions in the original README should work in this PR as well. However, the ultimate goal is to have a dApp running in a chain with a UI without having to follow any of those steps. This is currently achievable but it takes time and we want to reduce this wait time as much as possible.
Important Steps
.devcontainerdirectory that loads an imagemudassirshabbir/dab:mc3. This image contains a linux system with node version18.20, GitHub CLI, Docker CLI, and currentdapp-agoric-basicsrepo withyarn installalready baked.dapp-agoric-basicsrepo withyarn installis baked in/usr/src/cache.devcontainer.jsonfile that is read by GHCS.--privilegedmode mainly because we want to run docker-in-docker for chain using followingmount:"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"entrypoint.shscript that is used to copy the installednode_modulesto the current workspaces that is mounted on/workspace.yarn start:dockerfollowed byyarn start:contract, we have created a docker image of the chain (a3p) with contract already deployed on it.docker run -d -v ".:/workspace" mudassirshabbir/a3p:dabThis saves us about five minutes on average. Once done, we can simply run
yarn start:uiand we are good to go.What Does Not Work at This Point
Currently, we need to perform
yarn installmanually. The work to bake it in first docker iamge is unfinished. The/usr/src/cacheversion of the repo has all the modules but copying it to/workspacedoes not provide intended results.Below are some of the instructions that be needed to resume the task from here.
Docker
dab:mc3Image ConstructionDocker image construction is done through
docker commitcommand. The following instructions are needed to be run to create the first docker image:After this point, I use
docker committo create an image.Docker
a3p:dabImage ConstructionThis is done through straightforward
yarn start:docker,yarn start:contract, followed by adocker commit. This can be automated throughcomposeand/orbuidbut currently there is no need.