You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repository repository is located [here](unstoppable-web-2.0.md#decentralized-infrastructure).
4
4
5
-
This repository serves as a general guide and proof of concept for **deploying a full-stack web application onto blockchain-based decentralized infrastructure**.
5
+
This repository serves as a general guide and proof of concept for deploying a full-stack web application onto blockchain-based decentralized infrastructure.
6
6
7
-
The repository is structured as a **monorepo** - with **infrastructure configuration**, **application frontend code**, and **application backend code** all in one repository. This is done so that anyone can clone or fork this one repository and begin to experiment with deploying a decentralized web application.
7
+
The repository is structured as a monorepo - with infrastructure configuration, application frontend code, and application backend code all in one repository. This is done so that anyone can clone or fork this one repository and begin to experiment with deploying a decentralized web application.
8
8
9
9
### Decentralized infrastructure
10
10
11
-
| DNS | Frontend | Backend | Redundant Database|
11
+
| DNS | Frontend | Backend |<p>Redundant </p><p>Database</p>|
The application structure is bootstrapped using this **cookiecutter** template [https://github.com/Buuntu/fastapi-react](https://github.com/Buuntu/fastapi-react). The **docker** image is based on [tiangolo/uvicorn-gunicorn-fastapi-docker](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker).
24
+
The application structure is bootstrapped using this [cookiecutter](https://github.com/Buuntu/fastapi-react) template. The **docker** image is based on this [image](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker).
25
25
26
26
The application code, technology choices, and configuration used in this repository should provide a general enough base to fork and adapt, or just reference, for future decentralized web application development.
27
27
28
28
### Deployed Demo
29
29
30
-
A deployed **live demo** was deployed using the steps in this guide. Link below:
A deployed [live demo](https://0000ac8v9uf92otn28omnuqfan0qd05f3gjrsfoonjpjl3m3ir7qds8.siasky.net/#) was deployed using the steps in this guide. 
35
31
36
32
## Guide
37
33
38
34
### Step 1 - Buy Handshake domain
39
35
40
36
There are a few simple options for registering a **Handshake** domain name:
41
37
42
-
1. Use a platform like **Namebase**[https://www.namebase.io/](https://www.namebase.io) or a tool like **Bob Wallet**[https://github.com/kyokan/bob-wallet](https://github.com/kyokan/bob-wallet) to purchase a top-level Handshake domain.
38
+
1. Use a platform like [Namebase](https://www.namebase.io) or a tool like [Bob Wallet](https://github.com/kyokan/bob-wallet) to purchase a top-level Handshake domain.
43
39
44
40
Domain purchases using Handshake are achieved through an [auction process](https://www.namebase.io/blog/tutorial-3-basics-of-handshake-auction-and-bidding). It will take **10 days** for your auction to finalize. and a winning bid, before you can make use of the domain.
45
-
2. Use **gateway.io**[https://gateway.io/](https://gateway.io) to purchase a domain under one of gateway's existing top-level Handshake domains, like **.c** or **.api**. Domains purchased in this way are **usable immediately**.
41
+
2. Use [**gateway.io**](https://gateway.io) to purchase a domain under one of gateway's existing top-level Handshake domains, like **.c** or **.api**. Domains purchased in this way are **usable immediately**.
46
42
47
43
### Step 2 - Push Docker image
48
44
49
-
1. Make sure **Docker**[https://www.docker.com/](https://www.docker.com) is installed.
45
+
1. Make sure [Docker](https://www.docker.com) is installed.
50
46
2.**CD** to the directory where your `Dockerfile` is. For this repository, it is in `application/backend/Dockerfile`.
51
47
3.**Build** and **tag** docker image `docker build -t/: .`
52
48
4.**Login** to dockerhub `docker login --username=`. You will be prompted for a password.
53
49
5.**Push** your docker image to dockerhub `docker push`. Paste this yaml into the tool.
54
50
55
51
### Step 3 - Deploy back-end to Akash
56
52
57
-
If you haven't already, take the time to read through the **Akash deployment documentation** and familiarize yourself with the concepts and steps involved[https://docs.akash.network/guides/deploy](https://docs.akash.network/guides/deploy).
53
+
If you haven't already, take the time to read through the [Akash deployment documentation](https://docs.akash.network/guides/deploy) and familiarize yourself with the concepts and steps involved.
58
54
59
-
You can deploy to Akash using the **standard Akash CLI** directly [https://docs.akash.network/guides/install](https://docs.akash.network/guides/install) but for the purpose of this guide, I am using **tombeynon's Akash Deploy UI**[https://github.com/tombeynon/akash-deploy](https://github.com/tombeynon/akash-deploy) which is a great tool built on top of the standard CLI. Steps for deploying to Akash using this tool are below.
55
+
You can deploy to Akash using the [standard Akash CLI](https://docs.akash.network/guides/cli)directly but for the purpose of this guide, I am using [Tom Beynon's Akash Deploy UI](https://github.com/tombeynon/akash-deploy) which is a great tool built on top of the standard CLI. Steps for deploying to Akash using this tool are below.
60
56
61
57
1. Start the **Akash Deploy UI** tool by running the following:
62
58
@@ -77,7 +73,7 @@ You can deploy to Akash using the **standard Akash CLI** directly [https://docs.
77
73
78
74
Deployment of the front-end to Skynet is **handled automatically** in this repository, using **GitHub Actions**. When any update to the `application/frontend/` directory is pushed to the _master_ branch, the Action workflow will be run automatically by GitHub. This [workflow](https://github.com/bcfus/unstoppable-stack/blob/master/.github/workflows/frontend.yml) tests, builds, and deploys the static files to **Skynet**.
79
75
80
-
This GitHub workflow is based on the excellent write-up by **Karol Wypchło** [https://blog.sia.tech/automated-deployments-on-skynet-28d2f32f6ca1](https://blog.sia.tech/automated-deployments-on-skynet-28d2f32f6ca1)and uses his pre-built Skynet deploy Action.
76
+
This GitHub workflow is based on the excellent [write-up by Karol Wypchło](https://blog.sia.tech/automated-deployments-on-skynet-28d2f32f6ca1)and uses his pre-built Skynet deploy Action.
81
77
82
78
The result of this GitHub Action is a **Skynet registry entry** that provides a constant point of reference for your DNS record. The **Skylink** itself changes with each deployment to Skynet and would require you to constantly update your DNS record if referencing it directly.
83
79
@@ -91,7 +87,7 @@ If using **Namebase**, you can now configure your Handshake domain to point to y
91
87
92
88
This **initial DNS configuration can take up to \~6 hours to be synced**. For all future code changes pushed to the _master_ branch, the _Deploy to Skynet_ Action will automatically update your Skynet Registry data and you should see the changes reflected very quickly.
93
89
94
-
**Once the DNS change takes effect**, your site will be accessible at `https://.hns.siasky.net`. For example, the demo application for this guide is accessible at [https://unstoppable-stack.hns.siasky.net/](https://unstoppable-stack.hns.siasky.net)
90
+
**Once the DNS change takes effect**, your site will be accessible at `https://.hns.siasky.net`. For example, the demo application for this guide is accessible [here](https://unstoppable-stack.hns.siasky.net).
95
91
96
92
### Step 6 - Setup HTTPS URL for API
97
93
@@ -238,12 +234,11 @@ You can now **visit** [**http://localhost:3000**](http://localhost:3000) in the
0 commit comments