michael / hub

Substance Hub
6 stars 0 forks source link

Substance Hub

We're using OSX for development, but this setup should work on Linux too. At least for the hub.

Prerequisites

Setup Dev Environment

Clone the Substance Mothership

$ git clone https://github.com/michael/substance.git

Execute the Substance update script. It sets up the whole environment

$ cd substance
$ ./update.sh -c # performs a clean build

Navigate to the Hub Repository

$ cd hub

Setup Database Environment

Initialize your Postgres Database by executing:

$ psql postgres -p 5432 -h localhost -f postgres.init

On Ubuntu, after installing postgres the command is

$ sudo -u postgres psql postgres -f postgres.init

Put this into your ~/.profile and adapt to your needs:

export SUBSTANCE_PRODUCTION_POSTGRES_CONN="postgres://substance:substance@localhost:5432/substance"
export SUBSTANCE_DEVELOPMENT_POSTGRES_CONN="postgres://substance:substance@localhost:5432/substance_development"
export SUBSTANCE_TEST_POSTGRES_CONN="postgres://substance:substance@localhost:5432/substance_test"

export SUBSTANCE_PRODUCTION_REDIS_CONF="$HOME/substance_production_redis.conf"
export SUBSTANCE_DEVELOPMENT_REDIS_CONF="$HOME/substance_development_redis.conf"
export SUBSTANCE_TEST_REDIS_CONF="$HOME/substance_test_redis.conf"

Please use the following ports for your Redis configurations:

Start the hub

./start.sh -d -s # Start in development env and apply default seed

Setup Redis

Start redis (by using the redis.conf in the repository, it uses port 6380 for the docstore)

localhost:hub michael $ redis-server redis.conf

Run the tests

  1. Start the Hub in Test Mode

    ./start.sh -t
  2. Start the Composer (composer/build/app/osx/Substance.app) and press ctrl + alt + t

    Now playing around with the test suite should be self-explanatory.