diff --git a/README.md b/README.md index 5013ea38b..73efdac9b 100644 --- a/README.md +++ b/README.md @@ -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: