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-basics
on 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
.devcontainer
directory that loads an imagemudassirshabbir/dab:mc3
. This image contains a linux system with node version18.20
, GitHub CLI, Docker CLI, and currentdapp-agoric-basics
repo withyarn install
already baked.dapp-agoric-basics
repo withyarn install
is baked in/usr/src/cache
.devcontainer.json
file that is read by GHCS.--privileged
mode 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.sh
script that is used to copy the installednode_modules
to the current workspaces that is mounted on/workspace
.yarn start:docker
followed 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:dab
This saves us about five minutes on average. Once done, we can simply run
yarn start:ui
and we are good to go.What Does Not Work at This Point
Currently, we need to perform
yarn install
manually. The work to bake it in first docker iamge is unfinished. The/usr/src/cache
version of the repo has all the modules but copying it to/workspace
does not provide intended results.Below are some of the instructions that be needed to resume the task from here.
Docker
dab:mc3
Image ConstructionDocker image construction is done through
docker commit
command. The following instructions are needed to be run to create the first docker image:After this point, I use
docker commit
to create an image.Docker
a3p:dab
Image ConstructionThis is done through straightforward
yarn start:docker
,yarn start:contract
, followed by adocker commit
. This can be automated throughcompose
and/orbuid
but currently there is no need.