Skip to content

Commit

Permalink
Merge pull request #370 from dappforce/feat/update-readme-guide
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
iv1310 authored Mar 18, 2024
2 parents ff8173d + 97e905a commit 9998b6a
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,61 @@ PolkaVerse is a niche social site built on the Subsocial network. It focuses on

Visit Subsocial's [website](https://subsocial.network) to learn more about the project.

## Guide to build and deploy polkaverse

### Build the docker images
1. Prepare the [dockerfile](./docker/Dockerfile) and adjust the config if needed.
2. Build the image in local with this command and please ensure to add build argument.
```bash
$ docker build --build-arg GH_GA_ID=valueREDACTED --build-arg GH_APP_KIND=valueREDACTED --build-arg GH_HCAPTCHA_SITE_KEY=valueREDACTED --build-arg GH_AMP_ID=valueREDACTED --build-arg GH_OFFCHAIN_SIGNER_URL=valueREDACTED --build-arg GH_CONNECTION_KIND=valueREDACTED --build-arg GH_SELLER_CLIENT_ID=valueREDACTED --build-arg GH_SERVER_MNEMONIC==valueREDACTED --build-arg GH_SELLER_TOKEN_SIGNER=valueREDACTED --build-arg GH_NEXT_PUBLIC_DATAHUB_QUERY_URL=valueREDACTED --build-arg GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL=valueREDACTED --build-arg GH_DATAHUB_QUEUE_URL=valueREDACTED --build-arg GH_DATAHUB_QUEUE_TOKEN=valueREDACTED -t polkaverse-docker-image:latest .
```
Notes:
Please execute the build process with theses build arguments, you need to specify the value.
* GH_GA_ID=valueREDACTED
* GH_APP_KIND=valueREDACTED
* GH_HCAPTCHA_SITE_KEY=valueREDACTED
* GH_AMP_ID=valueREDACTED
* GH_OFFCHAIN_SIGNER_URL=valueREDACTED
* GH_CONNECTION_KIND=valueREDACTED
* GH_SELLER_CLIENT_ID=valueREDACTED
* GH_SELLER_TOKEN_SIGNER=valueREDACTED
* GH_SERVER_MNEMONIC=valueREDACTED
* GH_NEXT_PUBLIC_DATAHUB_QUERY_URL=valueREDACTED
* GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL=valueREDACTED
* GH_DATAHUB_QUEUE_URL=valueREDACTED
* GH_DATAHUB_QUEUE_TOKEN=valueREDACTED
3. Then check the docker images that has been builded.
```bash
$ docker images | grep "polkaverse"
```

### Run the container with docker-compose
1. To run the docker images with docker-compose, please prepare the docker-compose.yaml config file at first.
```yaml
# docker-compose.yml
version: "3"
services:
web-ui:
image: polkaverse-docker-image:latest
ports:
- "3003:3003" # Application port
container_name: polkaverse-web-app
restart: on-failure
```
```bash
$ docker-compose -f docker-compose.yaml up -d
```
2. Check the running container with this command.
```bash
$ docker-compose ps
$ docker-compose logs
```
3. Test to connect to the application.
```bash
$ curl -I http://localhost:3003
```


## Run locally

Clone this repo:
Expand Down

0 comments on commit 9998b6a

Please sign in to comment.