Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remember to build machine before deploying images #25

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@ jobs:
- name: Install Sunodo and build
run: |
npm install -g @sunodo/cli
sunodo build
IMAGE_TAG=$(sunodo deploy build --platform linux/amd64 | grep "Application node Docker image" | awk '{print $NF}')
docker push $IMAGE_TAG:registry.fly.io/cartezcash:latest
49 changes: 49 additions & 0 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Deployment Procedure

There are 4 main components that need to be updated on a new release. These are:
- The on-chain dApp registration
- The dApp node
- The fullnode service
- The bridge UI

Both the dApp node and the fullnode are hosted on flly.io.

## On-chain Deployment

This needs to be done first as other components depend on the result.

First step is to build the dApp image

```shell
sunodo build
```

Copy the last hash printed out. This is the templateHash

```shell
...
Manual yield rx-accepted (0x100000000 data)
Cycles: 566705956
566705956: 04003a8df136902507ea6103e4cd06e6e812b2ed25f630400ff3f19d0055aaec <---- templateHash
Storing machine: please wait
Successfully copied 386MB to /Users/willem/repos/CarteZcash/.sunodo/image
```

next visit

```
https://sunodo.io/deploy?templateHash=<template-hash>
```
and select the chain to deploy to and provide the wallet address of the dApp operator.

Make the deployment transaction and copy the resulting variables show into the [fly.toml](./fly.toml) file.

## Hosted Deployments (via Github actions)

- Commit the variables added to the fly.toml
- push to the repo and merge to main
- Cut a new release using https://github.com/willemolding/CarteZcash/releases/new

Once a new release has been tagged this will deploy the remaining components configured to work with the on-chain dApp.

Wait a few minutes and it should be ready to go!
Loading