Coder Social home page Coder Social logo

ykankaya / dappforce-subsocial-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from f3joule/dappforce-subsocial-starter

0.0 2.0 0.0 76 KB

Start all parts of Subsocial in Docker containers with a single script.

Home Page: https://github.com/dappforce/dappforce-subsocial-starter

License: GNU General Public License v3.0

Shell 100.00%

dappforce-subsocial-starter's Introduction

Subsocial Starter by DappForce

Starts entire Subsocial stack with one shell script.

Requirements

You should have Linux or macOS with Docker and Docker Compose installed.

To test that Docker installed correctly, try to run the next commands - none of them should fail.

docker images
docker ps
docker run --rm -it -p 80:80 nginx

Get started

If you're new to Subsocial, it's best to start with the defaults:

git clone [email protected]:dappforce/dappforce-subsocial-starter.git
cd dappforce-subsocial-starter

./start.sh 

Possible issues on Linux

If you are using Linux and having permission issues with Docker, then you may want to do this:

sudo systemctl enable docker
sudo systemctl disable docker

Then logout and log back in and all the Docker commands you find online should work fine without sudo.

Options

The start.sh script comes with a set of options for customizing project startup.

Argument Description
--global Binds the project parts to global IP visible on ifconfig.me
--force-pull Pull Docker images tagged latest if only --tag isn't specified
--tag Specify Docker images tag
--prune (all-volumes) Remove the Docker containers. If all-volumes is specified, remove volumes as well
--no-offchain Start Subsocial stack without offchain storage and Elasticsearch
--no-substrate Start Subsocial stack without Substrate node
--no-webui Start Subsocial stack without Web UI
--no-apps Start Subsocial stack without JS Apps
--only-offchain Start (or update) only offchain container
--only-substrate Start (or update) only Substrate node's container
--only-webui Start (or update) only Web UI container
--only-apps Start (or update) only JS Apps container
--substrate-url Specify Substrate websocket URL. Example: ./start.sh --global --substrate-url ws://172.15.0.20:9944
--offchain-url Specify Offchain URL. Example: ./start.sh --global --offchain-url http://172.15.0.3:3001
--elastic-url Specify Elasticsearch cluster URL. Example: ./start.sh --global --elastic-url http://172.15.0.5:9200
--webui-ip Specify Web UI ip address. Example: ./start.sh --global --substrate-url http://172.15.0.2
--apps-url Specify JS Apps URL. Example: ./start.sh --global --apps-url http://172.15.0.6:3002

Web UI

By default it will start one container for Web UI. If it is running, you can open the Subsocial in your browser:

http://localhost/

This one can be managed with --no-webui and --only-webui flags.

Container name External Port Local URL Description
subsocial-web-ui 80 http://localhost Subsocial UI

JS Apps

By default it will start one container for JS Apps. If it is running, you can successfully go to the 'Advanced' tab in the Web UI side-menu:

http://localhost:3002/

This one can be managed with --no-apps and --only-apps flags.

Container name External Port Local URL Description
subsocial-apps 3002 http://localhost:3002 Subsocial Apps

Offchain storage

By default it will start three containers: PostgreSQL, ElasticSearch and offchain (Substrate events handler, Subsocial API) itself.

This one can be managed with --no-offchain and --only-offchain flags.

Container name External Port Local URL Description
subsocial-offchain 3001 http://localhost:3001/v1 Subsocial Offchain
subsocial-elasticsearch 9200 http://localhost:9200 Elasticsearch
subsocial-postgres PostgreSQL

Substrate node

By default it will start two local validator nodes in Docker containers: Alice and Bob. Offchain and others connect to Alice's node, because it's external.

Additional options can be added using --substrate-extra-opts (beta). This one can be managed with --no-substrate and --only-substrate flags.

Container name External Port Local URL Description
subsocial-node-alice 9944 http://localhost:9944
subsocial-node-bob Local chain of Substrate Node

dappforce-subsocial-starter's People

Contributors

f3joule avatar siman avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.