Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/dappforce/polkaverse into d…
Browse files Browse the repository at this point in the history
…eploy/embed
  • Loading branch information
teodorus-nathaniel committed Mar 19, 2024
2 parents b57b260 + b838224 commit d8f65f9
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 33 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
7 changes: 0 additions & 7 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,3 @@ services:
container_name: subsocial-web-ui
restart: on-failure
network_mode: "host"

nginx:
build: ./nginx
container_name: subsocial-proxy
image: dappforce/subsocial-proxy:latest
restart: on-failure
network_mode: "host"
9 changes: 0 additions & 9 deletions docker/nginx/Dockerfile

This file was deleted.

16 changes: 0 additions & 16 deletions docker/nginx/default.conf

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/posts/editor/FullEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ const FullEditor = ({
type='primary'
block
className='mt-3'
disabled={publishIsDisable}
{...txProps}
disabled={publishIsDisable || txProps.disabled}
/>
</Card>
{!totalStake?.hasStakedEnough && (
Expand Down

0 comments on commit d8f65f9

Please sign in to comment.